summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Mares <mj@ucw.cz>2010-12-04 18:49:05 +0100
committerMartin Mares <mj@ucw.cz>2010-12-04 18:49:05 +0100
commita30f08396bd651989c0f3ca98805acc731e07213 (patch)
treec4130d367c6d6bf876bbb36b91bd1b61caae2ecd
parente2864327195d067728dd904f8ff72959c8097508 (diff)
downloadpciutils-a30f08396bd651989c0f3ca98805acc731e07213.tar.gz
Moved #include <unistd.h> to pciutils.h and avoid it on Windows
-rw-r--r--lspci.c1
-rw-r--r--pciutils.h2
-rw-r--r--setpci.c1
3 files changed, 2 insertions, 2 deletions
diff --git a/lspci.c b/lspci.c
index 54317cf..bca1ccb 100644
--- a/lspci.c
+++ b/lspci.c
@@ -10,7 +10,6 @@
#include <string.h>
#include <stdlib.h>
#include <stdarg.h>
-#include <unistd.h>
#include "lspci.h"
diff --git a/pciutils.h b/pciutils.h
index 1f347a5..e433e6b 100644
--- a/pciutils.h
+++ b/pciutils.h
@@ -11,6 +11,8 @@
#ifdef PCI_OS_WINDOWS
#include "compat/getopt.h"
+#else
+#include <unistd.h>
#endif
#define PCIUTILS_VERSION PCILIB_VERSION
diff --git a/setpci.c b/setpci.c
index 5711e51..731c612 100644
--- a/setpci.c
+++ b/setpci.c
@@ -10,7 +10,6 @@
#include <string.h>
#include <stdlib.h>
#include <stdarg.h>
-#include <unistd.h>
#include <errno.h>
#define PCIUTILS_SETPCI