diff options
Diffstat (limited to 'src/lib/libc/net/htons.c')
-rw-r--r-- | src/lib/libc/net/htons.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/lib/libc/net/htons.c b/src/lib/libc/net/htons.c index b2500a51d1..9b1de6ccfc 100644 --- a/src/lib/libc/net/htons.c +++ b/src/lib/libc/net/htons.c | |||
@@ -15,8 +15,12 @@ static char *rcsid = "$NetBSD: htons.c,v 1.5 1995/04/28 23:25:19 jtc Exp $"; | |||
15 | #undef htons | 15 | #undef htons |
16 | 16 | ||
17 | unsigned short | 17 | unsigned short |
18 | #if __STDC__ | ||
19 | htons(unsigned short x) | ||
20 | #else | ||
18 | htons(x) | 21 | htons(x) |
19 | unsigned short x; | 22 | unsigned short x; |
23 | #endif | ||
20 | { | 24 | { |
21 | #if BYTE_ORDER == LITTLE_ENDIAN | 25 | #if BYTE_ORDER == LITTLE_ENDIAN |
22 | u_char *s = (u_char *) &x; | 26 | u_char *s = (u_char *) &x; |