From: Dirk Mueller Date: Wed, 19 Nov 2003 22:07:14 +0000 (+0000) Subject: this should fix compilation on weird kernel 2.6.x installations. X-Git-Tag: svn/VALGRIND_2_1_0~47 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2c314c8a97b55e927591edb6e101ef8a35bb435b;p=thirdparty%2Fvalgrind.git this should fix compilation on weird kernel 2.6.x installations. CCMAIL: 68360@bugs.kde.org git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2052 --- diff --git a/coregrind/vg_syscalls.c b/coregrind/vg_syscalls.c index 2d40d681e2..a3d48c4662 100644 --- a/coregrind/vg_syscalls.c +++ b/coregrind/vg_syscalls.c @@ -2487,7 +2487,7 @@ PRE(ioctl) break; # endif - case IIOCGETCPS: + case VKI_IIOCGETCPS: /* In early 2.4 kernels, ISDN_MAX_CHANNELS was only defined * when KERNEL was. I never saw a larger value than 64 though */ # ifndef ISDN_MAX_CHANNELS @@ -2497,7 +2497,7 @@ PRE(ioctl) ISDN_MAX_CHANNELS * 2 * sizeof(unsigned long) ); break; - case IIOCNETGPN: + case VKI_IIOCNETGPN: SYSCALL_TRACK( pre_mem_read, tid, "ioctl(IIOCNETGPN)", (UInt)&((isdn_net_ioctl_phone *)arg3)->name, sizeof(((isdn_net_ioctl_phone *)arg3)->name) ); @@ -2886,7 +2886,7 @@ POST(ioctl) break; # endif - case IIOCGETCPS: + case VKI_IIOCGETCPS: /* In early 2.4 kernels, ISDN_MAX_CHANNELS was only defined * when KERNEL was. I never saw a larger value than 64 though */ # ifndef ISDN_MAX_CHANNELS @@ -2896,7 +2896,7 @@ POST(ioctl) VG_TRACK( post_mem_write, arg3, ISDN_MAX_CHANNELS * 2 * sizeof(unsigned long) ); break; - case IIOCNETGPN: + case VKI_IIOCNETGPN: if (res == 0) VG_TRACK( post_mem_write, arg3, sizeof(isdn_net_ioctl_phone) ); break; diff --git a/coregrind/vg_unsafe.h b/coregrind/vg_unsafe.h index 64d1630032..0ad6a60db2 100644 --- a/coregrind/vg_unsafe.h +++ b/coregrind/vg_unsafe.h @@ -57,7 +57,6 @@ #include /* for struct msgbuf */ #include /* for struct sembuf */ -#include /* for ISDN ioctls */ #include /* for the SG_* ioctls */ #include /* for struct sched_param */ #include /* for struct __sysctl_args */ diff --git a/include/vg_kerneliface.h b/include/vg_kerneliface.h index 55d66b396b..30b16f2763 100644 --- a/include/vg_kerneliface.h +++ b/include/vg_kerneliface.h @@ -371,6 +371,19 @@ struct vki_ucontext { #define VKI_ERESTARTSYS 512 /* Restart the syscall */ +/* Copied from linux/isdn.h */ + +#define VKI_IIOCGETCPS _IO( 'I',21 ) +#define VKI_IIOCNETGPN _IO( 'I',34 ) + +#define ISDN_MSNLEN 32 + +typedef struct { + char name[ 10 ]; + char phone[ ISDN_MSNLEN ]; + int outgoing; +} isdn_net_ioctl_phone; + /* Gawd ... hack ... */