aboutsummaryrefslogtreecommitdiff
path: root/slirp/ip.h
diff options
context:
space:
mode:
Diffstat (limited to 'slirp/ip.h')
-rw-r--r--slirp/ip.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/slirp/ip.h b/slirp/ip.h
index 59cf4aa..83fc9cd 100644
--- a/slirp/ip.h
+++ b/slirp/ip.h
@@ -33,7 +33,9 @@
#ifndef IP_H
#define IP_H
-#ifdef HOST_WORDS_BIGENDIAN
+#include <glib.h>
+
+#if G_BYTE_ORDER == G_BIG_ENDIAN
# undef NTOHL
# undef NTOHS
# undef HTONL
@@ -69,7 +71,7 @@ typedef uint32_t n_long; /* long as received from the net */
* Structure of an internet header, naked of options.
*/
struct ip {
-#ifdef HOST_WORDS_BIGENDIAN
+#if G_BYTE_ORDER == G_BIG_ENDIAN
uint8_t ip_v:4, /* version */
ip_hl:4; /* header length */
#else
@@ -135,7 +137,7 @@ struct ip_timestamp {
uint8_t ipt_code; /* IPOPT_TS */
uint8_t ipt_len; /* size of structure (variable) */
uint8_t ipt_ptr; /* index of current entry */
-#ifdef HOST_WORDS_BIGENDIAN
+#if G_BYTE_ORDER == G_BIG_ENDIAN
uint8_t ipt_oflw:4, /* overflow counter */
ipt_flg:4; /* flags, see below */
#else