1
0

400-portability_fixes.patch 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  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. @@ -283,12 +283,11 @@ static void setup_signals(void)
  37. /* ------------------------------- main ... ------------------------------- */
  38. -static void trace_on_exit(int status,void *dummy)
  39. +static void trace_on_exit(void)
  40. {
  41. char path[PATH_MAX+1];
  42. FILE *file;
  43. - if (!status) return;
  44. if (!dump_dir) file = stderr;
  45. else {
  46. sprintf(path,"atmsigd.%d.trace.exit",getpid());
  47. @@ -517,7 +516,7 @@ int main(int argc,char **argv)
  48. exit(0);
  49. }
  50. }
  51. - (void) on_exit(trace_on_exit,NULL);
  52. + (void) atexit(trace_on_exit);
  53. poll_loop();
  54. close_all();
  55. for (sig = entities; sig; sig = sig->next) stop_saal(&sig->saal);
  56. --- a/src/test/align.c
  57. +++ b/src/test/align.c
  58. @@ -24,7 +24,7 @@
  59. #include <signal.h>
  60. #include <sys/types.h>
  61. #include <sys/socket.h>
  62. -#include <sys/errno.h>
  63. +#include <errno.h>
  64. #include <atm.h>