--- ./Makefile.in.orig	2021-07-22 04:39:42 +0000
+++ ./Makefile.in	2021-07-22 04:52:11 +0000
@@ -2636,6 +2638,8 @@
 	common/$(DEPDIR)/$(am__dirstamp)
 common/compat.lo: common/$(am__dirstamp) \
 	common/$(DEPDIR)/$(am__dirstamp)
+common/getopt_long.lo: common/$(am__dirstamp) \
+       common/$(DEPDIR)/$(am__dirstamp)
 common/constants.lo: common/$(am__dirstamp) \
 	common/$(DEPDIR)/$(am__dirstamp)
 common/debug.lo: common/$(am__dirstamp) \
 
--- ./p11-kit/p11-kit.c.orig	2021-07-22 05:24:50 +0000
+++ ./p11-kit/p11-kit.c	2021-07-22 05:25:08 +0000
@@ -43,7 +43,7 @@
 #include <assert.h>
 #include <ctype.h>
 #include <errno.h>
-#include <getopt.h>
+#include "getopt_long.h"
 #include <string.h>
 #include <stdio.h>
 #include <stdlib.h>
--- ./trust/anchor.c.orig	2021-07-22 05:26:14 +0000
+++ ./trust/anchor.c	2021-07-22 05:26:53 +0000
@@ -50,7 +50,7 @@
 #include "p11-kit/p11-kit.h"
 
 #include <assert.h>
-#include <getopt.h>
+#include "getopt_long.h"
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
--- ./trust/extract.c.orig	2021-07-22 05:27:32 +0000
+++ ./trust/extract.c	2021-07-22 05:27:56 +0000
@@ -52,7 +52,7 @@
 #include <assert.h>
 #include <ctype.h>
 #include <errno.h>
-#include <getopt.h>
+#include "getopt_long.h"
 #include <stdint.h>
 #include <stdio.h>
 #include <stdlib.h>
--- ./trust/trust.c.orig	2021-07-22 05:28:29 +0000
+++ ./trust/trust.c	2021-07-22 05:28:55 +0000
@@ -48,7 +48,7 @@
 
 #include <assert.h>
 #include <ctype.h>
-#include <getopt.h>
+#include "getopt_long.h"
 #include <string.h>
 #include <stdio.h>
 #include <stdlib.h>

--- Makefile.in_orig	2024-10-11 01:30:47.089360413 -0500
+++ Makefile.in	2024-10-11 01:39:19.087168832 -0500
@@ -348,7 +348,7 @@
 	common/compat.lo common/constants.lo common/debug.lo \
 	common/dict.lo common/hash.lo common/hex.lo common/lexer.lo \
 	common/message.lo common/path.lo common/pem.lo \
-	common/runtime.lo common/url.lo common/vsock.lo \
+	common/runtime.lo common/url.lo common/vsock.lo common/getopt_long.lo \
 	$(am__objects_1)
 libp11_common_la_OBJECTS = $(am_libp11_common_la_OBJECTS)
 libp11_kit_internal_la_LIBADD =
@@ -2127,6 +2127,7 @@
 	common/url.c common/url.h \
 	common/vsock.c common/vsock.h \
 	common/init.h \
+	common/getopt_long.c common/getopt_long.h \
 	$(NULL)
 
 libp11_library_la_SOURCES = \
@@ -6887,6 +6888,7 @@
 	-rm -f common/$(DEPDIR)/unix-peer.Plo
 	-rm -f common/$(DEPDIR)/url.Plo
 	-rm -f common/$(DEPDIR)/vsock.Plo
+	-rm -f common/$(DEPDIR)/getopt_long.Plo
 	-rm -f fuzz/$(DEPDIR)/main.Po
 	-rm -f fuzz/$(DEPDIR)/rpc_fuzzer.Po
 	-rm -f p11-kit/$(DEPDIR)/client_la-client-init.Plo
@@ -7159,6 +7161,7 @@
 	-rm -f common/$(DEPDIR)/unix-peer.Plo
 	-rm -f common/$(DEPDIR)/url.Plo
 	-rm -f common/$(DEPDIR)/vsock.Plo
+	-rm -f common/$(DEPDIR)/getopt_long.Plo
 	-rm -f fuzz/$(DEPDIR)/main.Po
 	-rm -f fuzz/$(DEPDIR)/rpc_fuzzer.Po
 	-rm -f p11-kit/$(DEPDIR)/client_la-client-init.Plo
--- common/options.h_orig	2024-10-11 03:44:48.725453649 -0500
+++ common/options.h	2024-10-11 03:45:09.971933347 -0500
@@ -35,7 +35,7 @@
 #ifndef P11_OPTIONS_H_
 #define P11_OPTIONS_H_
 
-#include <getopt.h>
+#include "getopt_long.h"
 
 #define P11_TOOL_FALLBACK ""
 
--- common/options.c_orig	2024-10-11 03:52:23.701935711 -0500
+++ common/options.c	2024-10-11 03:52:51.407986974 -0500
@@ -42,7 +42,7 @@
 
 #include <assert.h>
 #include <ctype.h>
-#include <getopt.h>
+#include "getopt_long.h"
 #include <string.h>
 #include <stdio.h>
 #include <stdlib.h>
