source:
scripts/patches/util-linux-2.12a-kernel_headers-1.patch@
763fed9
Last change on this file since 763fed9 was 7f65c0e, checked in by , 19 years ago | |
---|---|
|
|
File size: 3.1 KB |
-
disk-utils/blockdev.c
Submitted By: Jim Gifford (jim at linuxfromscratch dot org) Date: 2004-01-30 Initial Package Version: 2.12 Origin: Gentoo Description: Fixes Compile Issues with the 2.6 Kernel diff -Naur util-linux-2.12.orig/disk-utils/blockdev.c util-linux-2.12/disk-utils/blockdev.c
old new 9 9 #include <string.h> 10 10 #include <unistd.h> 11 11 #include <sys/ioctl.h> 12 #include <linux/version.h> 12 13 13 14 #include "nls.h" 14 15 … … 24 25 #define BLKRASET _IO(0x12,98) 25 26 #define BLKRAGET _IO(0x12,99) 26 27 #define BLKSSZGET _IO(0x12,104) 28 #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 0) 27 29 #define BLKBSZGET _IOR(0x12,112,sizeof(int)) 28 30 #define BLKBSZSET _IOW(0x12,113,sizeof(int)) 31 #else 32 #define BLKBSZGET _IOR(0x12,112,int) 33 #define BLKBSZSET _IOW(0x12,113,int) 34 #endif 29 35 #endif 30 36 31 37 /* Maybe <linux/hdreg.h> could be included */ -
disk-utils/elvtune.c
diff -Naur util-linux-2.12.orig/disk-utils/elvtune.c util-linux-2.12/disk-utils/elvtune.c
old new 26 26 #include <sys/ioctl.h> 27 27 #include <unistd.h> 28 28 #include <stdlib.h> 29 #include <linux/version.h> 30 29 31 #include "nls.h" 30 32 31 33 /* this has to match with the kernel structure */ … … 37 39 int max_bomb_segments; 38 40 } blkelv_ioctl_arg_t; 39 41 42 #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 0) 40 43 #define BLKELVGET _IOR(0x12,106,sizeof(blkelv_ioctl_arg_t)) 41 44 #define BLKELVSET _IOW(0x12,107,sizeof(blkelv_ioctl_arg_t)) 45 #else 46 #define BLKELVGET _IOR(0x12,106,blkelv_ioctl_arg_t) 47 #define BLKELVSET _IOW(0x12,107,blkelv_ioctl_arg_t) 48 #endif 42 49 43 50 static void 44 51 usage(void) { -
fdisk/common.h
diff -Naur util-linux-2.12.orig/fdisk/common.h util-linux-2.12/fdisk/common.h
old new 2 2 3 3 /* including <linux/fs.h> fails */ 4 4 #include <sys/ioctl.h> 5 #include <linux/version.h> 6 5 7 #define BLKRRPART _IO(0x12,95) /* re-read partition table */ 6 8 #define BLKGETSIZE _IO(0x12,96) /* return device size */ 7 9 #define BLKFLSBUF _IO(0x12,97) /* flush buffer cache */ 8 10 #define BLKSSZGET _IO(0x12,104) /* get block device sector size */ 11 12 #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 0) 9 13 #define BLKGETSIZE64 _IOR(0x12,114,8) /* 8 = sizeof(u64) */ 14 #else 15 #define BLKGETSIZE64 _IOR(0x12,114,unsigned long long) 16 #endif 10 17 11 18 /* including <linux/hdreg.h> also fails */ 12 19 struct hd_geometry { -
mount/my_dev_t.h
diff -Naur util-linux-2.12.orig/mount/my_dev_t.h util-linux-2.12/mount/my_dev_t.h
old new 4 4 /* for ancient systems use "unsigned short" */ 5 5 6 6 #include <linux/posix_types.h> 7 #include <linux/version.h> 8 9 #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 0) 7 10 #define my_dev_t __kernel_dev_t 11 #else 12 #define my_dev_t int 13 #endif
Note:
See TracBrowser
for help on using the repository browser.