Bug: https://bugs.gentoo.org/895882
--- a/src/getopt.c
+++ b/src/getopt.c
@@ -39,6 +39,7 @@
 #endif
 
 #include <stdio.h>
+#include <string.h>
 
 /* Comment out all this code if we are using the GNU C Library, and are not
    actually compiling the library itself.  This code is part of the GNU C
