diff options
Diffstat (limited to 'sys/i386')
-rw-r--r-- | sys/i386/include/endian.h | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/sys/i386/include/endian.h b/sys/i386/include/endian.h index c8b86ee..d686532 100644 --- a/sys/i386/include/endian.h +++ b/sys/i386/include/endian.h @@ -117,11 +117,20 @@ __bswap16(__uint16_t _x) return (__byte_swap_word(_x)); } -#endif /* __GNUC__ */ - #define __htonl(x) __bswap32(x) #define __htons(x) __bswap16(x) #define __ntohl(x) __bswap32(x) #define __ntohs(x) __bswap16(x) +#else /* !__GNUC__ */ + +/* + * No optimizations are available for this compiler. Fall back to + * non-optimized functions by defining the constant usually used to prevent + * redefinition. + */ +#define _BYTEORDER_FUNC_DEFINED + +#endif /* __GNUC__ */ + #endif /* !_MACHINE_ENDIAN_H_ */ |