]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Including getopt.h if HAVE_GETOPT_OPTRESET is defined (#2007)
authorKlaus Holst Jacobsen <48069914+klausholstjacobsen@users.noreply.github.com>
Mon, 4 Dec 2023 16:25:42 +0000 (17:25 +0100)
committerGitHub <noreply@github.com>
Mon, 4 Dec 2023 16:25:42 +0000 (08:25 -0800)
On platforms that uses optreset we must also include getopt.h to have it
defined

unzip/bsdunzip.c

index 9ed1d7bf667b9de5096c4e19318ed2ce05e31caf..6c6e50ae2e18de733429632f8bce4649d1346ff2 100644 (file)
@@ -76,6 +76,9 @@
 #include <sys/time.h>
 #endif
 #endif
+#ifdef HAVE_GETOPT_OPTRESET
+#include <getopt.h>
+#endif
 
 #include "bsdunzip.h"
 #include "passphrase.h"