aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Mares <mj@ucw.cz>2024-02-18 12:10:21 +0100
committerMartin Mares <mj@ucw.cz>2024-02-18 12:10:21 +0100
commit37ccbb7e3f7db7d98b3f3c092bc30bbd405e6796 (patch)
tree43897d6d2f5d42eb6e2c92376d788ab6595a2b20
parent5de4f91b7190d7eec42f55a2b79e679a71f283be (diff)
downloadpciutils-37ccbb7e3f7db7d98b3f3c092bc30bbd405e6796.tar.gz
Let us use <getopt.h> everywhere
It is needed by pcilmr anyway. If it turns out to be missing on your system, please extend the condition for use of compat/getopt.h in pciutils.h.
-rw-r--r--pcilmr.c1
-rw-r--r--pciutils.h2
2 files changed, 1 insertions, 2 deletions
diff --git a/pcilmr.c b/pcilmr.c
index 8cb5eee..cb8bd77 100644
--- a/pcilmr.c
+++ b/pcilmr.c
@@ -8,7 +8,6 @@
* SPDX-License-Identifier: GPL-2.0-or-later
*/
-#include <getopt.h>
#include <memory.h>
#include <stdio.h>
#include <stdlib.h>
diff --git a/pciutils.h b/pciutils.h
index 036f0dc..53e0ee1 100644
--- a/pciutils.h
+++ b/pciutils.h
@@ -28,7 +28,7 @@
#if defined(PCI_OS_WINDOWS) && !(defined(__MINGW32_MAJOR_VERSION) && __MINGW32_MAJOR_VERSION >= 3)
#include "compat/getopt.h"
#else
-#include <unistd.h>
+#include <getopt.h>
#endif
#define PCIUTILS_VERSION PCILIB_VERSION