Fixup fromcvs/togit conversion
[minix-pkgsrc.git] / sysutils / strace / patches / patch-ai
blob5d9ce7cd9d2dabda153d72ee03119ae2847b14e4
1 $NetBSD$
3 --- ioctl.c.orig        2005-02-02 15:32:13.000000000 -0500
4 +++ ioctl.c     2007-04-27 11:35:05.000000000 -0400
5 @@ -68,6 +68,7 @@
6  const struct ioctlent *ioctlent;
7  int nioctlents;
8  
9 +#ifndef NETBSD
10  static int
11  compare(a, b)
12  const void *a;
13 @@ -77,11 +78,19 @@
14         unsigned long code2 = ((struct ioctlent *) b)->code;
15         return (code1 > code2) ? 1 : (code1 < code2) ? -1 : 0;
16  }
17 +#endif
19  const struct ioctlent *
20  ioctl_lookup(code)
21  long code;
22  {
23 +#ifdef NETBSD
24 +       int i;
25 +       for (i = 0; i < nioctlents; i++)
26 +               if (ioctlent[i].code == code)
27 +                       return  &ioctlent[i];
28 +       return NULL;
29 +#else
30         struct ioctlent *iop, ioent;
32         ioent.code = code;
33 @@ -96,6 +105,7 @@
34                         break;
35                 }
36         return iop;
37 +#endif
38  }
40  const struct ioctlent *
41 @@ -130,14 +140,14 @@
42         case 0x89:
43  #else /* !LINUX */
44         case 'r': case 's': case 'i':
45 -#ifndef FREEBSD
46 +#ifndef ALLBSD
47         case 'p':
48  #endif
49  #endif /* !LINUX */
50                 return sock_ioctl(tcp, code, arg);
51  #ifdef USE_PROCFS
52  #ifndef HAVE_MP_PROCFS
53 -#ifndef FREEBSD
54 +#ifndef ALLBSD
55         case 'q':
56  #else
57         case 'p':