summaryrefslogtreecommitdiff
path: root/lcdgps.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2010-12-14 19:23:20 -0500
committerEric S. Raymond <esr@thyrsus.com>2010-12-14 19:23:20 -0500
commita3d71aa35d22cbd6576edc296bef660a2a79a7f9 (patch)
tree7ba98c3144f5bb34212e0e25ee7ffc286146f9e1 /lcdgps.c
parentafce76e3ef85909847596583b5ac0057969cdd8e (diff)
downloadgpsd-a3d71aa35d22cbd6576edc296bef660a2a79a7f9.tar.gz
Better approach to guarding some includes.
Diffstat (limited to 'lcdgps.c')
-rw-r--r--lcdgps.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/lcdgps.c b/lcdgps.c
index 041cd8e6..03a0ca92 100644
--- a/lcdgps.c
+++ b/lcdgps.c
@@ -36,11 +36,13 @@
#include <sys/types.h>
#include <sys/stat.h>
-#ifndef __linux__ /* <netdb.h> briongs these in under Linux */
+#include <netdb.h>
+#ifndef AF_UNSPEC
#include <sys/socket.h>
+#endif /* AF_UNSPEC */
+#ifndef INADDR_ANY
#include <netinet/in.h>
-#endif /* __linux__ */
-#include <netdb.h>
+#endif /* INADDR_ANY */
#include <time.h> /* for select() */
#include <stdlib.h>
#include <string.h>