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 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/coregrind/vg_syscalls.c b/coregrind/vg_syscalls.c
index 2d40d68..a3d48c4 100644
--- a/coregrind/vg_syscalls.c
+++ b/coregrind/vg_syscalls.c
@@ -2487,7 +2487,7 @@
       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 @@
 		     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 @@
       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 @@
 	 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 64d1630..0ad6a60 100644
--- a/coregrind/vg_unsafe.h
+++ b/coregrind/vg_unsafe.h
@@ -57,7 +57,6 @@
 #include <linux/msg.h>    /* for struct msgbuf */
 #include <linux/sem.h>    /* for struct sembuf */
 
-#include <linux/isdn.h>   /* for ISDN ioctls */
 #include <scsi/sg.h>      /* for the SG_* ioctls */
 #include <sched.h>        /* for struct sched_param */
 #include <linux/sysctl.h> /* for struct __sysctl_args */
diff --git a/include/vg_kerneliface.h b/include/vg_kerneliface.h
index 55d66b3..30b16f2 100644
--- a/include/vg_kerneliface.h
+++ b/include/vg_kerneliface.h
@@ -371,6 +371,19 @@
 
 #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 ... */