size_t 974 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. --- a/fix_options.c
  2. +++ b/fix_options.c
  3. @@ -38,7 +38,12 @@ struct request_info *request;
  4. #ifdef IP_OPTIONS
  5. unsigned char optbuf[BUFFER_SIZE / 3], *cp;
  6. char lbuf[BUFFER_SIZE], *lp;
  7. +#ifdef __GLIBC__
  8. + socklen_t optsize = sizeof(optbuf);
  9. + int ipproto;
  10. +#else
  11. int optsize = sizeof(optbuf), ipproto;
  12. +#endif
  13. struct protoent *ip;
  14. int fd = request->fd;
  15. unsigned int opt;
  16. --- a/socket.c
  17. +++ b/socket.c
  18. @@ -95,7 +95,11 @@ struct request_info *request;
  19. static struct sockaddr_in client;
  20. static struct sockaddr_in server;
  21. #endif
  22. +#ifdef __GLIBC__
  23. + socklen_t len;
  24. +#else
  25. int len;
  26. +#endif
  27. char buf[BUFSIZ];
  28. int fd = request->fd;
  29. @@ -426,7 +430,11 @@ int fd;
  30. #else
  31. struct sockaddr_in sin;
  32. #endif
  33. +#ifdef __GLIBC__
  34. + socklen_t size = sizeof(sin);
  35. +#else
  36. int size = sizeof(sin);
  37. +#endif
  38. /*
  39. * Eat up the not-yet received datagram. Some systems insist on a