[PATCH] use <arpa/inet.h> instead of <netinet/in.h> for ntohl/htonl

Jed Davis jdev at panix.com
Sun Jul 3 20:24:03 UTC 2005


This fixes the Mac OS X build problem; hopefully it won't break any
other OSes, especially since SUSv3 says arpa/inet is the right header.
( http://www.opengroup.org/onlinepubs/009695399/functions/ntohl.html )

--------------------------------------------------------------------------
# HG changeset patch
# User jdev at panix.com
# Node ID 12363a4b43b76c8fff3cfac9a9ff3f0a87d257fe
# Parent  e8fd41110dce25ee4b389c891bf7dbc0a90c1f62

Fix htonl/ntohl includes.

diff -r e8fd41110dce -r 12363a4b43b7 mercurial/bdiff.c
--- a/mercurial/bdiff.c Fri Jul  1 22:46:31 2005
+++ b/mercurial/bdiff.c Sat Jul  2 16:54:39 2005
@@ -28,7 +28,7 @@
 }
 #else
 #include <sys/types.h>
-#include <netinet/in.h>
+#include <arpa/inet.h>
 #endif
 
 struct line {
diff -r e8fd41110dce -r 12363a4b43b7 mercurial/mpatch.c
--- a/mercurial/mpatch.c        Fri Jul  1 22:46:31 2005
+++ b/mercurial/mpatch.c        Sat Jul  2 16:54:39 2005
@@ -39,7 +39,7 @@
 }
 #else
 #include <sys/types.h>
-#include <netinet/in.h>
+#include <arpa/inet.h>
 #endif
 
 static char mpatch_doc[] = "Efficient binary patching.";
--------------------------------------------------------------------------

-- 
(let ((C call-with-current-continuation)) (apply (lambda (x y) (x y)) (map
((lambda (r) ((C C) (lambda (s) (r (lambda l (apply (s s) l))))))  (lambda
(f) (lambda (l) (if (null? l) C (lambda (k) (display (car l)) ((f (cdr l))
(C k)))))))    '((#\J #\d #\D #\v #\s) (#\e #\space #\a #\i #\newline)))))




More information about the Mercurial mailing list