summaryrefslogtreecommitdiff
path: root/libgpsd_core.c
diff options
context:
space:
mode:
Diffstat (limited to 'libgpsd_core.c')
-rw-r--r--libgpsd_core.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/libgpsd_core.c b/libgpsd_core.c
index 20457217..4d121792 100644
--- a/libgpsd_core.c
+++ b/libgpsd_core.c
@@ -1,17 +1,24 @@
/* $Id$ */
/* libgpsd_core.c -- direct access to GPSes on serial or USB devices. */
+#include <stdlib.h>
+#include "gpsd_config.h"
#include <sys/time.h>
-#include <sys/ioctl.h>
+#ifdef HAVE_SYS_IOCTL_H
+ #include <sys/ioctl.h>
+#endif /* HAVE_SYS_IOCTL_H */
#ifndef S_SPLINT_S
-#include <sys/socket.h>
-#include <unistd.h>
+ #ifdef HAVE_SYS_SOCKET_H
+ #include <sys/socket.h>
+ #endif /* HAVE_SYS_SOCKET_H */
+ #include <unistd.h>
#endif /* S_SPLINT_S */
#include <sys/time.h>
-#include <stdlib.h>
#include <stdio.h>
#include <math.h>
#ifndef S_SPLINT_S
-#include <netdb.h>
+ #ifdef HAVE_NETDB_H
+ #include <netdb.h>
+ #endif /* HAVE_NETDB_H */
#endif /* S_SPLINT_S */
#include <string.h>
#include <errno.h>