--- doc/examples/tlsproxy/tlsproxy.c.ORG	2018-12-19 15:44:13.511418201 +0530
+++ doc/examples/tlsproxy/tlsproxy.c	2018-12-21 14:57:57.831932521 +0530
@@ -27,7 +27,6 @@
 #include "config.h"
 
 #include <errno.h>
-#include <getopt.h>
 #include <netdb.h>
 #include <signal.h>
 #include <stdio.h>
@@ -38,6 +37,7 @@
 #include <unistd.h>
 
 #include "crypto-gnutls.h"
+#include "../../getopt_long.c"
 
 static char *connectaddr = NULL;
 static char *listenaddr = NULL;
--- tests/pkcs11/list-tokens.c.ORG	2018-12-20 16:14:04.143041525 +0530
+++ tests/pkcs11/list-tokens.c	2018-12-21 14:58:15.179954239 +0530
@@ -33,11 +33,11 @@
 #include <gnutls/gnutls.h>
 #include <gnutls/x509.h>
 #include <gnutls/abstract.h>
-#include <getopt.h>
 #include <assert.h>
 #define P11_KIT_FUTURE_UNSTABLE_API
 #include <p11-kit/p11-kit.h>
 #include "cert-common.h"
+#include "../../getopt_long.c"
 
 /* lists the registered PKCS#11 modules by p11-kit.
  */
