From: Roy Marples Date: Fri, 12 Jun 2015 20:51:22 +0000 (+0000) Subject: Fix compile on BSD X-Git-Tag: v6.9.1~54 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=483f793b56bacbf9eade36331a1073882ea164f1;p=thirdparty%2Fdhcpcd.git Fix compile on BSD --- diff --git a/ipv4.h b/ipv4.h index fa558960..9c842230 100644 --- a/ipv4.h +++ b/ipv4.h @@ -35,7 +35,11 @@ (IN_IFF_TENTATIVE | IN_IFF_DUPLICATED | IN_IFF_DETACHED) #endif -#ifndef HTONL +/* Prefer our macro */ +#ifdef HTONL +#undef HTONL +#endif + #if BYTE_ORDER == BIG_ENDIAN #define HTONL(A) (A) #elif BYTE_ORDER == LITTLE_ENDIAN @@ -44,10 +48,9 @@ (((uint32_t)(A) & 0x00ff0000) >> 8) | \ (((uint32_t)(A) & 0x0000ff00) << 8) | \ (((uint32_t)(A) & 0x000000ff) << 24)) -#endif #else #error Endian unknown -#endif /* HTONL */ +#endif /* BYTE_ORDER */ struct rt { TAILQ_ENTRY(rt) next;