400-portability_fixes.patch 1.5 KB

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