400-portability_fixes.patch 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. diff -urN linux-atm-2.5.2/src/ilmid/io.c linux-atm-2.5.2.new/src/ilmid/io.c
  2. --- linux-atm-2.5.2/src/ilmid/io.c 2008-01-01 01:14:50.000000000 +0100
  3. +++ linux-atm-2.5.2.new/src/ilmid/io.c 2012-11-23 17:32:18.149268039 +0100
  4. @@ -48,6 +48,14 @@
  5. be manually configured (after ilmid has
  6. registered the "official" address) - HACK */
  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. diff -urN linux-atm-2.5.2/src/mpoad/io.c linux-atm-2.5.2.new/src/mpoad/io.c
  19. --- linux-atm-2.5.2/src/mpoad/io.c 2008-01-01 01:14:51.000000000 +0100
  20. +++ linux-atm-2.5.2.new/src/mpoad/io.c 2012-11-23 17:34:17.745271101 +0100
  21. @@ -10,14 +10,7 @@
  22. #include <errno.h>
  23. #include <sys/ioctl.h>
  24. #include <sys/param.h> /* for OPEN_MAX */
  25. -#if __GLIBC__ >= 2
  26. #include <sys/poll.h>
  27. -#else /* ugly hack to make it compile on RH 4.2 - WA */
  28. -#include <syscall.h>
  29. -#include <linux/poll.h>
  30. -#define SYS_poll 168
  31. -_syscall3(int,poll,struct pollfd *,ufds,unsigned int,nfds,int,timeout);
  32. -#endif
  33. #include <atm.h>
  34. #include <linux/types.h>
  35. #include <linux/atmioc.h>
  36. diff -urN linux-atm-2.5.2/src/sigd/atmsigd.c linux-atm-2.5.2.new/src/sigd/atmsigd.c
  37. --- linux-atm-2.5.2/src/sigd/atmsigd.c 2008-01-01 01:14:52.000000000 +0100
  38. +++ linux-atm-2.5.2.new/src/sigd/atmsigd.c 2012-11-23 17:30:38.689265492 +0100
  39. @@ -517,7 +517,7 @@
  40. exit(0);
  41. }
  42. }
  43. - (void) on_exit(trace_on_exit,NULL);
  44. + (void) atexit(trace_on_exit);
  45. poll_loop();
  46. close_all();
  47. for (sig = entities; sig; sig = sig->next) stop_saal(&sig->saal);
  48. diff -urN linux-atm-2.5.2/src/test/align.c linux-atm-2.5.2.new/src/test/align.c
  49. --- linux-atm-2.5.2/src/test/align.c 2001-10-10 00:33:08.000000000 +0200
  50. +++ linux-atm-2.5.2.new/src/test/align.c 2012-11-23 17:25:15.077257206 +0100
  51. @@ -24,7 +24,7 @@
  52. #include <signal.h>
  53. #include <sys/types.h>
  54. #include <sys/socket.h>
  55. -#include <sys/errno.h>
  56. +#include <errno.h>
  57. #include <atm.h>