summaryrefslogtreecommitdiffstats
path: root/lib/libstand/stand.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libstand/stand.h')
-rw-r--r--lib/libstand/stand.h16
1 files changed, 11 insertions, 5 deletions
diff --git a/lib/libstand/stand.h b/lib/libstand/stand.h
index e3570f9..fcbb2e8 100644
--- a/lib/libstand/stand.h
+++ b/lib/libstand/stand.h
@@ -374,15 +374,21 @@ extern struct devsw *devsw[];
/*
* Expose byteorder(3) functions.
*/
-#define htonl(x) __htonl(x)
-#define htons(x) __htons(x)
-#define ntohl(x) __ntohl(x)
-#define ntohs(x) __ntohs(x)
-
+#ifndef _BYTEORDER_PROTOTYPED
+#define _BYTEORDER_PROTOTYPED
extern uint32_t htonl(uint32_t);
extern uint16_t htons(uint16_t);
extern uint32_t ntohl(uint32_t);
extern uint16_t ntohs(uint16_t);
+#endif
+
+#ifndef _BYTEORDER_FUNC_DEFINED
+#define _BYTEORDER_FUNC_DEFINED
+#define htonl(x) __htonl(x)
+#define htons(x) __htons(x)
+#define ntohl(x) __ntohl(x)
+#define ntohs(x) __ntohs(x)
+#endif
#if 0
OpenPOWER on IntegriCloud