]> mj.ucw.cz Git - pciutils.git/commitdiff
Let us use <getopt.h> everywhere
authorMartin Mares <mj@ucw.cz>
Sun, 18 Feb 2024 11:10:21 +0000 (12:10 +0100)
committerMartin Mares <mj@ucw.cz>
Sun, 18 Feb 2024 11:10:21 +0000 (12:10 +0100)
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.

pcilmr.c
pciutils.h

index 8cb5eee240d95fdc3f1c722fe4da19c5cb9a6c74..cb8bd77a04fded0a3d8c3c811aa040d538778717 100644 (file)
--- 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>
index 036f0dc9e78c187bccca43bd83391b4d31616a3b..53e0ee1b1c4db34ef06aedc13ca05b75e65bb925 100644 (file)
@@ -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