diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2023-08-08 18:37:53 +0200 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2023-08-08 18:37:53 +0200 |
commit | 486fba5505fc0c579321fd8cc125bac8058d197f (patch) | |
tree | efbe8f73d86c9b488b628a73420709fc5a40b118 /device | |
parent | 7b5132d201722011e6f04cc876d0aebe9afc18c6 (diff) | |
download | gnumach-486fba5505fc0c579321fd8cc125bac8058d197f.tar.gz gnumach-486fba5505fc0c579321fd8cc125bac8058d197f.tar.bz2 gnumach-486fba5505fc0c579321fd8cc125bac8058d197f.zip |
net_io: Fix long / int confusion
In network terms, long is 32bit, i.e. an int for us.
Diffstat (limited to 'device')
-rw-r--r-- | device/net_io.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/device/net_io.c b/device/net_io.c index cabb1be9..ee9435d7 100644 --- a/device/net_io.c +++ b/device/net_io.c @@ -1570,17 +1570,17 @@ net_io_init(void) #ifndef BPF_ALIGN #define EXTRACT_SHORT(p) ((u_short)ntohs(*(u_short *)p)) -#define EXTRACT_LONG(p) (ntohl(*(u_long *)p)) +#define EXTRACT_LONG(p) (ntohl(*(u_int *)p)) #else #define EXTRACT_SHORT(p)\ ((u_short)\ ((u_short)*((u_char *)p+0)<<8|\ (u_short)*((u_char *)p+1)<<0)) #define EXTRACT_LONG(p)\ - ((u_long)*((u_char *)p+0)<<24|\ - (u_long)*((u_char *)p+1)<<16|\ - (u_long)*((u_char *)p+2)<<8|\ - (u_long)*((u_char *)p+3)<<0) + ((u_int)*((u_char *)p+0)<<24|\ + (u_int)*((u_char *)p+1)<<16|\ + (u_int)*((u_char *)p+2)<<8|\ + (u_int)*((u_char *)p+3)<<0) #endif /* |