summaryrefslogtreecommitdiff
path: root/sockaddr.h
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2010-12-14 08:09:49 -0500
committerEric S. Raymond <esr@thyrsus.com>2010-12-14 08:09:49 -0500
commit1e0126fcbf956b5893dabcac2c7c3f5002ce910c (patch)
treebfbf7b365af98444431d391a464a5ecb5bf5e87f /sockaddr.h
parenteead1c2ac4df683dd43c8b6e0a1c766a00f7c702 (diff)
downloadgpsd-1e0126fcbf956b5893dabcac2c7c3f5002ce910c.tar.gz
More header simplification. All regression tests pass.
Diffstat (limited to 'sockaddr.h')
-rw-r--r--sockaddr.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/sockaddr.h b/sockaddr.h
index 61866d09..118fb372 100644
--- a/sockaddr.h
+++ b/sockaddr.h
@@ -1,5 +1,25 @@
/* klugey def'n of a socket address struct helps hide IPV4 vs. IPV6 ugliness */
+#ifndef S_SPLINT_S
+#ifdef HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#else
+#define AF_UNSPEC 0
+#endif /* HAVE_SYS_SOCKET_H */
+#ifdef HAVE_SYS_UN_H
+#include <sys/un.h>
+#endif /* HAVE_SYS_UN_H */
+#ifdef HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#endif /* HAVE_NETINET_IN_H */
+#ifdef HAVE_ARPA_INET_H
+#include <arpa/inet.h>
+#endif /* HAVE_ARPA_INET_H */
+#ifdef HAVE_NETDB_H
+#include <netdb.h>
+#endif /* HAVE_NETDB_H */
+#endif /* S_SPLINT_S */
+
typedef union sockaddr_u {
struct sockaddr sa;
struct sockaddr_in sa_in;