summaryrefslogtreecommitdiff
path: root/src/lib/libc/net/ntohs.c
diff options
context:
space:
mode:
authortholo <>1996-03-25 22:06:55 +0000
committertholo <>1996-03-25 22:06:55 +0000
commit26bf2499c42c994d91e3a86ae74b1a2d8b829c9f (patch)
tree25e84b7bf48bc541c13556ad6f6f66b0faa30a2b /src/lib/libc/net/ntohs.c
parentc25c16795b2748b87f78736ade4213077a6cd03a (diff)
downloadopenbsd-26bf2499c42c994d91e3a86ae74b1a2d8b829c9f.tar.gz
openbsd-26bf2499c42c994d91e3a86ae74b1a2d8b829c9f.tar.bz2
openbsd-26bf2499c42c994d91e3a86ae74b1a2d8b829c9f.zip
Pull in prototypes
Do the right thing in presense of __STDC__
Diffstat (limited to 'src/lib/libc/net/ntohs.c')
-rw-r--r--src/lib/libc/net/ntohs.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/lib/libc/net/ntohs.c b/src/lib/libc/net/ntohs.c
index 93ab83ee4d..6e180c16ab 100644
--- a/src/lib/libc/net/ntohs.c
+++ b/src/lib/libc/net/ntohs.c
@@ -15,8 +15,12 @@ static char *rcsid = "$NetBSD: ntohs.c,v 1.5 1995/04/28 23:25:23 jtc Exp $";
15#undef ntohs 15#undef ntohs
16 16
17unsigned short 17unsigned short
18#if __STDC__
19ntohs(unsigned short x)
20#else
18ntohs(x) 21ntohs(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;