summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.am3
-rw-r--r--cgps.c2
-rw-r--r--lcdgps.c3
3 files changed, 5 insertions, 3 deletions
diff --git a/Makefile.am b/Makefile.am
index fd0529e5..e00dc3c4 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -651,9 +651,10 @@ xmllint: $(XML)
for xml in $(XML); do xmllint --nonet --noout --valid $$xml; done
# Use deheader to remove headers not required
+ENABLES = -DBINARY_ENABLE -DDEBUG -DDBUS_ENABLE -DPPS_ENABLE -DRAW_ENABLE
deheader:
make clean
- deheader -r -i gpsd_config.h -i gpsd.h -m "MORECFLAGS='-Werror -Wfatal-errors' make -e"
+ deheader -r -i gpsd_config.h -i gpsd.h -m "MORECFLAGS='-Werror -Wfatal-errors $(ENABLES)' make -e"
make clean
# Re-indent the codebase in a uniform style for readability.
diff --git a/cgps.c b/cgps.c
index 0d5b5589..4fa50190 100644
--- a/cgps.c
+++ b/cgps.c
@@ -78,8 +78,10 @@
/* This is the maximum size we need for the 'satellites' window. */
#define MAX_SATWIN_SIZE (MAX_POSSIBLE_SATS + SATWIN_OVERHEAD)
+#if defined (HAVE_SYS_SELECT_H)
#include <sys/types.h>
#include <sys/select.h>
+#endif
#ifndef S_SPLINT_S
#include <sys/socket.h>
#include <unistd.h>
diff --git a/lcdgps.c b/lcdgps.c
index f108adea..8a598789 100644
--- a/lcdgps.c
+++ b/lcdgps.c
@@ -34,8 +34,6 @@
#define CLIMB 3
-#include <sys/types.h>
-#include <sys/stat.h>
#include <stdlib.h>
#include "gpsd_config.h"
#include <string.h>
@@ -45,6 +43,7 @@
#include <math.h>
#include <errno.h>
#ifdef HAVE_SYS_SELECT_H
+ #include <sys/types.h>
#include <sys/select.h>
#endif /* HAVE_SYS_SELECT_H */
#ifndef S_SPLINT_S