diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2010-12-14 19:23:20 -0500 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2010-12-14 19:23:20 -0500 |
commit | a3d71aa35d22cbd6576edc296bef660a2a79a7f9 (patch) | |
tree | 7ba98c3144f5bb34212e0e25ee7ffc286146f9e1 /lcdgps.c | |
parent | afce76e3ef85909847596583b5ac0057969cdd8e (diff) | |
download | gpsd-a3d71aa35d22cbd6576edc296bef660a2a79a7f9.tar.gz |
Better approach to guarding some includes.
Diffstat (limited to 'lcdgps.c')
-rw-r--r-- | lcdgps.c | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -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> |