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