2
1

tcpdump.00-extern-inline-fixup.patch 1.1 KB

123456789101112131415161718192021222324252627282930
  1. --- tcpdump-3.9.5.oorig/tcpdump-stdinc.h 2006-06-23 04:07:27.000000000 +0200
  2. +++ tcpdump-3.9.5/tcpdump-stdinc.h 2007-05-14 10:26:25.000000000 +0200
  3. @@ -149,15 +149,15 @@ typedef char* caddr_t;
  4. #undef htonl
  5. #undef htons
  6. - extern __inline__ unsigned long __ntohl (unsigned long x);
  7. - extern __inline__ unsigned short __ntohs (unsigned short x);
  8. + static __inline__ unsigned long __ntohl (unsigned long x);
  9. + static __inline__ unsigned short __ntohs (unsigned short x);
  10. #define ntohl(x) __ntohl(x)
  11. #define ntohs(x) __ntohs(x)
  12. #define htonl(x) __ntohl(x)
  13. #define htons(x) __ntohs(x)
  14. - extern __inline__ unsigned long __ntohl (unsigned long x)
  15. + static __inline__ unsigned long __ntohl (unsigned long x)
  16. {
  17. __asm__ ("xchgb %b0, %h0\n\t" /* swap lower bytes */
  18. "rorl $16, %0\n\t" /* swap words */
  19. @@ -166,7 +166,7 @@ typedef char* caddr_t;
  20. return (x);
  21. }
  22. - extern __inline__ unsigned short __ntohs (unsigned short x)
  23. + static __inline__ unsigned short __ntohs (unsigned short x)
  24. {
  25. __asm__ ("xchgb %b0, %h0" /* swap bytes */
  26. : "=q" (x) : "0" (x));