include cleanups: remove unused headers and add feature test macros
diff --git a/src/legacy/getpass.c b/src/legacy/getpass.c
index d439a2a..3565d95 100644
--- a/src/legacy/getpass.c
+++ b/src/legacy/getpass.c
@@ -1,5 +1,5 @@
+#define _GNU_SOURCE
 #include <stdio.h>
-#include <string.h>
 #include <termios.h>
 #include <unistd.h>
 #include <fcntl.h>