summaryrefslogtreecommitdiffstats
path: root/sys/ia64/include/endian.h
diff options
context:
space:
mode:
Diffstat (limited to 'sys/ia64/include/endian.h')
-rw-r--r--sys/ia64/include/endian.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/sys/ia64/include/endian.h b/sys/ia64/include/endian.h
index 7ba8bbf..c3d42cc 100644
--- a/sys/ia64/include/endian.h
+++ b/sys/ia64/include/endian.h
@@ -93,11 +93,20 @@ __bswap16(__uint16_t __x)
return (__bswap64(__x) >> 48);
}
-#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_ */
OpenPOWER on IntegriCloud