diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2010-01-02 22:29:16 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2010-01-02 22:29:16 +0000 |
commit | d5904b6b45850cc731d45ec81ff2294d0afe26ad (patch) | |
tree | 7c4a7359ac46d3a01475b203a17c03d634438e57 /netlib.c | |
parent | f46e4a8da378d9287824c7ce84ef296effaa3c94 (diff) | |
download | gpsd-d5904b6b45850cc731d45ec81ff2294d0afe26ad.tar.gz |
David Ludlow's housekeeping and type-cleanup patch.
All regression tests pass,
Diffstat (limited to 'netlib.c')
-rw-r--r-- | netlib.c | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -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 @*/ |