diff --git a/test/mongoose_custom.h b/test/mongoose_custom.h
index 97ddfecd4168f357396f524fda6901326455603d..5963078ede3c7ac158a5795334f8d6a728a983e7 100644
--- a/test/mongoose_custom.h
+++ b/test/mongoose_custom.h
@@ -1,6 +1,8 @@
 // Required by the test ARM build
 #pragma once
 
+#define _GNU_SOURCE  // For fopencookie()
+
 #include <errno.h>
 #include <stdarg.h>
 #include <stdbool.h>