summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gpsd.h13
1 files changed, 5 insertions, 8 deletions
diff --git a/gpsd.h b/gpsd.h
index 66944f8e..7df0105a 100644
--- a/gpsd.h
+++ b/gpsd.h
@@ -6,7 +6,12 @@
#include <stdbool.h>
#include <stdio.h>
+#ifdef HAVE_TERMIOS_H
#include <termios.h>
+#endif
+#ifdef HAVE_SYS_TERMIOS_H
+#include <sys/termios.h>
+#endif
#include "gps.h"
/* Some internal capabilities depend on which drivers we're compiling. */
@@ -97,14 +102,6 @@ struct gps_type_t {
double cycle;
};
-#if defined (HAVE_SYS_TERMIOS_H)
-#include <sys/termios.h>
-#else
-#if defined (HAVE_TERMIOS_H)
-#include <termios.h>
-#endif
-#endif
-
/*
* The packet buffers need to be as long than the longest packet we
* expect to see in any protocol, because we have to be able to hold