summaryrefslogtreecommitdiff
path: root/netlib.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2010-01-02 22:29:16 +0000
committerEric S. Raymond <esr@thyrsus.com>2010-01-02 22:29:16 +0000
commitd5904b6b45850cc731d45ec81ff2294d0afe26ad (patch)
tree7c4a7359ac46d3a01475b203a17c03d634438e57 /netlib.c
parentf46e4a8da378d9287824c7ce84ef296effaa3c94 (diff)
downloadgpsd-d5904b6b45850cc731d45ec81ff2294d0afe26ad.tar.gz
David Ludlow's housekeeping and type-cleanup patch.
All regression tests pass,
Diffstat (limited to 'netlib.c')
-rw-r--r--netlib.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/netlib.c b/netlib.c
index e5287a98..10d4df5b 100644
--- a/netlib.c
+++ b/netlib.c
@@ -18,8 +18,12 @@
#endif
#endif /* S_SPLINT_S */
#ifndef S_SPLINT_S
-#include <netdb.h>
-#include <arpa/inet.h>
+ #ifdef HAVE_NETDB_H
+ #include <netdb.h>
+ #endif /* HAVE_NETDB_H */
+ #ifdef HAVE_ARPA_INET_H
+ #include <arpa/inet.h>
+ #endif /* HAVE_ARPA_INET_H */
#endif /* S_SPLINT_S */
#include <errno.h>
#include <stdlib.h>
@@ -88,7 +92,7 @@ socket_t netlib_connectsock(const char *host, const char *service, const char *p
#endif
#ifdef TCP_NODELAY
if (type == SOCK_STREAM)
- setsockopt(s, IPPROTO_TCP, TCP_NODELAY, &one, sizeof one);
+ setsockopt(s, IPPROTO_TCP, TCP_NODELAY, (char *)&one, sizeof one);
#endif
return s;
/*@ +type +mustfreefresh @*/