--- a/tests/src/libsystem.c
+++ b/tests/src/libsystem.c
@@ -213,7 +213,7 @@
     return g_strdup (path);
 }
 
-#ifdef __linux__
+#ifdef __GLIBC__
 static int
 open_wrapper (const char *func, const char *pathname, int flags, mode_t mode)
 {
