aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorBen Leslie <benjl@cse.unsw.edu.au>2004-08-23 21:30:39 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2004-08-23 21:30:39 -0700
commit2c4fc034b7266644ce0db9577c7000a2de42840e (patch)
tree27eecf4a9e6c29abc40cea3e6543bb09295cfb00 /scripts
parent70b9eca4bb8106e887498065740d0e8ffc79a352 (diff)
downloadhistory-2c4fc034b7266644ce0db9577c7000a2de42840e.tar.gz
[PATCH] Use posix headers in sumversion.c
When compiling Linux on Mac OSX I had trouble with scripts/sumversion.c. It includes <netinet/in.h> to obtain to definitions of htonl and ntohl. On Mac OSX these are found in <arpa/inet.h>. After checking the POSIX specification it appears that this is the correct place to get the definitons for these functions. (http://www.opengroup.org/onlinepubs/009695399/functions/htonl.html) Using this header also appears to work on Linux (at least with Glibc-2.3.2). It seems clearer to me to go with the POSIX standard than implementing #if __APPLE__ style macros, but if such an approach is preferred I can supply patches for that instead. A patch against 2.6.7 which change <netinet/in.h> -> <arpa/inet.h> is attached. Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/mod/sumversion.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/mod/sumversion.c b/scripts/mod/sumversion.c
index 631430d09e4ded..b41b718edffefa 100644
--- a/scripts/mod/sumversion.c
+++ b/scripts/mod/sumversion.c
@@ -1,4 +1,4 @@
-#include <arpa/inet.h>
+#include <netinet/in.h>
#include <stdint.h>
#include <ctype.h>
#include <errno.h>