patch-include_platform_h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. --- busybox-1.15.2.orig/include/platform.h Sat Sep 26 15:14:33 2009
  2. +++ busybox-1.15.2/include/platform.h Sat Dec 19 12:53:00 2009
  3. @@ -7,6 +7,8 @@
  4. #ifndef BB_PLATFORM_H
  5. #define BB_PLATFORM_H 1
  6. +#include <sys/param.h>
  7. +
  8. /* Convenience macros to test the version of gcc. */
  9. #undef __GNUC_PREREQ
  10. #if defined __GNUC__ && defined __GNUC_MINOR__
  11. @@ -133,7 +135,7 @@ char *strchrnul(const char *s, int c);
  12. # define bswap_32 __bswap32
  13. # define bswap_16 __bswap16
  14. # define __BIG_ENDIAN__ (_BYTE_ORDER == _BIG_ENDIAN)
  15. -#elif !defined __APPLE__
  16. +#elif !(defined __APPLE__ || defined BSD)
  17. # include <byteswap.h>
  18. # include <endian.h>
  19. #endif
  20. @@ -190,7 +192,7 @@ char *strchrnul(const char *s, int c);
  21. /* ---- Networking ------------------------------------------ */
  22. -#ifndef __APPLE__
  23. +#if !(defined __APPLE__ || defined BSD)
  24. # include <arpa/inet.h>
  25. # if !defined(__socklen_t_defined) && !defined(_SOCKLEN_T_DECLARED)
  26. typedef int socklen_t;
  27. @@ -202,7 +204,7 @@ typedef int socklen_t;
  28. /* ---- Compiler dependent settings ------------------------- */
  29. #if (defined __digital__ && defined __unix__) \
  30. - || defined __APPLE__ || defined __FreeBSD__
  31. + || defined __APPLE__ || defined __FreeBSD__ || defined BSD
  32. # undef HAVE_MNTENT_H
  33. # undef HAVE_SYS_STATFS_H
  34. #else
  35. @@ -231,7 +233,7 @@ typedef int socklen_t;
  36. # define HAVE_FEATURES_H
  37. # include <stdint.h>
  38. # define HAVE_STDINT_H
  39. -#elif !defined __APPLE__
  40. +#elif !(defined __APPLE__ || defined BSD)
  41. /* Largest integral types. */
  42. # if BB_BIG_ENDIAN
  43. /* Looks BROKEN! */