From 74097c99a6c238d620f56d7ef1d40c1e8213804e Mon Sep 17 00:00:00 2001 From: CTurt Date: Fri, 21 Aug 2015 14:50:13 +0100 Subject: [PATCH] Endian fix --- include/network.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/network.h b/include/network.h index 222d9ab..f1797fc 100644 --- a/include/network.h +++ b/include/network.h @@ -2,11 +2,12 @@ #include -#define IP(a, b, c, d) (((a) << 24) + ((b) << 16) + ((c) << 8) + (d)) +#define IP(a, b, c, d) (((a) << 0) + ((b) << 8) + ((c) << 16) + ((d) << 24)) +#define htons(a) __builtin_bswap16(a) #define SCENET 0xe -#define AF_INET 2 +#define AF_INET 0x0200 #define SOCK_STREAM 1 #define SOCK_DGRAM 2 -- 2.11.4.GIT