diff --git a/glnx-fdio.h b/glnx-fdio.h
index 5765a02c547b421510868fe6bc92e8b4051d7e94..47368dfc99f6ac7b01de3a4609a21656e1edc0de 100644
--- a/glnx-fdio.h
+++ b/glnx-fdio.h
@@ -25,6 +25,7 @@
 #include <dirent.h>
 #include <sys/stat.h>
 #include <fcntl.h>
+#include <string.h>
 #include <sys/xattr.h>
 /* From systemd/src/shared/util.h */
 /* When we include libgen.h because we need dirname() we immediately