iproute2: Add package for nstat utility
[openwrt.git] / package / network / utils / linux-atm / patches / 400-portability_fixes.patch
1 --- a/src/ilmid/io.c
2 +++ b/src/ilmid/io.c
3 @@ -48,6 +48,14 @@
4                              be manually configured (after ilmid has
5                              registered the "official" address) - HACK */
6  
7 +#ifndef SUN_LEN
8 +# include <string.h>            /* For prototype of `strlen'.  */
9 +
10 +/* Evaluate to actual length of the `sockaddr_un' structure.  */
11 +# define SUN_LEN(ptr) ((size_t) (((struct sockaddr_un *) 0)->sun_path)        \
12 +                      + strlen ((ptr)->sun_path))
13 +#endif
14 +
15  extern SysGroup *remsys;
16  extern State ilmi_state;
17  static short atm_itf = -1; /* bad value */
18 --- a/src/mpoad/io.c
19 +++ b/src/mpoad/io.c
20 @@ -10,14 +10,7 @@
21  #include <errno.h>
22  #include <sys/ioctl.h>
23  #include <sys/param.h> /* for OPEN_MAX   */
24 -#if __GLIBC__ >= 2
25  #include <sys/poll.h>
26 -#else /* ugly hack to make it compile on RH 4.2 - WA */
27 -#include <syscall.h>
28 -#include <linux/poll.h>
29 -#define SYS_poll 168
30 -_syscall3(int,poll,struct pollfd *,ufds,unsigned int,nfds,int,timeout);
31 -#endif
32  #include <atm.h>
33  #include <linux/types.h>
34  #include <linux/atmioc.h>
35 --- a/src/sigd/atmsigd.c
36 +++ b/src/sigd/atmsigd.c
37 @@ -517,7 +517,7 @@ int main(int argc,char **argv)
38             exit(0);
39         }
40      }
41 -    (void) on_exit(trace_on_exit,NULL);
42 +    (void) atexit(trace_on_exit);
43      poll_loop();
44      close_all();
45      for (sig = entities; sig; sig = sig->next) stop_saal(&sig->saal);
46 --- a/src/test/align.c
47 +++ b/src/test/align.c
48 @@ -24,7 +24,7 @@
49  #include <signal.h>
50  #include <sys/types.h>
51  #include <sys/socket.h>
52 -#include <sys/errno.h>
53 +#include <errno.h>
54  #include <atm.h>
55  
56