diff options
-rw-r--r-- | gpsd.c | 11 | ||||
-rw-r--r-- | netlib.c | 11 | ||||
-rw-r--r-- | sockaddr.h | 7 |
3 files changed, 21 insertions, 8 deletions
@@ -9,7 +9,6 @@ #include <sys/time.h> #include <sys/stat.h> #include <sys/types.h> -#include <netinet/in.h> #include <string.h> #include <stdlib.h> #include <stdarg.h> @@ -22,8 +21,18 @@ #include <errno.h> #include <fcntl.h> #include <locale.h> +#include <netdb.h> #ifndef S_SPLINT_S +#ifndef AF_UNSPEC #include <sys/socket.h> +#endif /* AF_UNSPEC */ +#endif /* S_SPLINT_S */ +#ifndef INADDR_ANY +#include <netinet/in.h> +#endif /* INADDR_ANY */ +#include <sys/un.h> +#include <arpa/inet.h> /* for htons() and friends */ +#ifndef S_SPLINT_S #include <unistd.h> #endif /* S_SPLINT_S */ @@ -7,6 +7,17 @@ #include <errno.h> #include <string.h> #include <fcntl.h> +#include <netdb.h> +#ifndef S_SPLINT_S +#ifndef AF_UNSPEC +#include <sys/socket.h> +#endif /* AF_UNSPEC */ +#endif /* S_SPLINT_S */ +#ifndef INADDR_ANY +#include <netinet/in.h> +#endif /* INADDR_ANY */ +#include <sys/un.h> +#include <arpa/inet.h> /* for htons() and friends */ #ifndef S_SPLINT_S #include <unistd.h> #endif /* S_SPLINT_S */ @@ -1,12 +1,5 @@ /* klugey def'n of a socket address struct helps hide IPV4 vs. IPV6 ugliness */ -#include <netdb.h> -#include <sys/un.h> -#include <arpa/inet.h> /* for htons() and friends */ -#ifndef S_SPLINT_S -#include <sys/socket.h> -#endif /* S_SPLINT_S */ - typedef union sockaddr_u { struct sockaddr sa; struct sockaddr_in sa_in; |