source: scripts/patches/util-linux-2.12a-kernel_headers-1.patch@ f8736bc

clfs-1.2 clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since f8736bc was 7f65c0e, checked in by Jim Gifford <clfs@…>, 19 years ago

r625@server (orig r623): jim | 2005-10-31 12:43:24 -0800
Final Move

  • Property mode set to 100644
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  
    99#include <string.h>
    1010#include <unistd.h>
    1111#include <sys/ioctl.h>
     12#include <linux/version.h>
    1213
    1314#include "nls.h"
    1415
     
    2425#define BLKRASET   _IO(0x12,98)
    2526#define BLKRAGET   _IO(0x12,99)
    2627#define BLKSSZGET  _IO(0x12,104)
     28#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 0)
    2729#define BLKBSZGET  _IOR(0x12,112,sizeof(int))
    2830#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
    2935#endif
    3036
    3137/* 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  
    2626#include <sys/ioctl.h>
    2727#include <unistd.h>
    2828#include <stdlib.h>
     29#include <linux/version.h>
     30
    2931#include "nls.h"
    3032
    3133/* this has to match with the kernel structure */
     
    3739        int max_bomb_segments;
    3840} blkelv_ioctl_arg_t;
    3941
     42#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 0)
    4043#define BLKELVGET   _IOR(0x12,106,sizeof(blkelv_ioctl_arg_t))
    4144#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
    4249
    4350static void
    4451usage(void) {
  • fdisk/common.h

    diff -Naur util-linux-2.12.orig/fdisk/common.h util-linux-2.12/fdisk/common.h
    old new  
    22
    33/* including <linux/fs.h> fails */
    44#include <sys/ioctl.h>
     5#include <linux/version.h>
     6
    57#define BLKRRPART    _IO(0x12,95)    /* re-read partition table */
    68#define BLKGETSIZE   _IO(0x12,96)    /* return device size */
    79#define BLKFLSBUF    _IO(0x12,97)    /* flush buffer cache */
    810#define BLKSSZGET    _IO(0x12,104)   /* get block device sector size */
     11
     12#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 0)
    913#define BLKGETSIZE64 _IOR(0x12,114,8)   /* 8 = sizeof(u64) */
     14#else
     15#define BLKGETSIZE64 _IOR(0x12,114,unsigned long long)
     16#endif
    1017
    1118/* including <linux/hdreg.h> also fails */
    1219struct 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  
    44/* for ancient systems use "unsigned short" */
    55
    66#include <linux/posix_types.h>
     7#include <linux/version.h>
     8
     9#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 0)
    710#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.