Module Name: src
Committed By: christos
Date: Wed Jan 25 14:46:16 UTC 2017
Modified Files:
src/external/bsd/tcpdump/dist: netdissect-stdinc.h
Log Message:
- don't use their ntoh{l,s}/hton{l,s} implementation
- fix their ntohl/htonl implementations to use unsigned int instead of
unsigned long so they work on _LP64.
To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/external/bsd/tcpdump/dist/netdissect-stdinc.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/external/bsd/tcpdump/dist/netdissect-stdinc.h
diff -u src/external/bsd/tcpdump/dist/netdissect-stdinc.h:1.1.1.1 src/external/bsd/tcpdump/dist/netdissect-stdinc.h:1.2
--- src/external/bsd/tcpdump/dist/netdissect-stdinc.h:1.1.1.1 Tue Jan 24 16:33:38 2017
+++ src/external/bsd/tcpdump/dist/netdissect-stdinc.h Wed Jan 25 09:46:16 2017
@@ -279,13 +279,13 @@ typedef char* caddr_t;
* avoid the bswap instruction, as OS X only supports machines that
* have it.)
*/
-#if defined(__GNUC__) && defined(__i386__) && !defined(__APPLE__) && !defined(__ntohl)
+#if defined(__GNUC__) && defined(__i386__) && !defined(__APPLE__) && !defined(__ntohl) && !defined(ntohl)
#undef ntohl
#undef ntohs
#undef htonl
#undef htons
- static __inline__ unsigned long __ntohl (unsigned long x);
+ static __inline__ unsigned int __ntohl (unsigned int x);
static __inline__ unsigned short __ntohs (unsigned short x);
#define ntohl(x) __ntohl(x)
@@ -293,7 +293,7 @@ typedef char* caddr_t;
#define htonl(x) __ntohl(x)
#define htons(x) __ntohs(x)
- static __inline__ unsigned long __ntohl (unsigned long x)
+ static __inline__ unsigned int __ntohl (unsigned int x)
{
__asm__ ("xchgb %b0, %h0\n\t" /* swap lower bytes */
"rorl $16, %0\n\t" /* swap words */