about summary refs log tree commit diff
path: root/sysdeps/generic/tmpfile.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/generic/tmpfile.c')
-rw-r--r--sysdeps/generic/tmpfile.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sysdeps/generic/tmpfile.c b/sysdeps/generic/tmpfile.c
index 9b60dbb43d..051cb79abd 100644
--- a/sysdeps/generic/tmpfile.c
+++ b/sysdeps/generic/tmpfile.c
@@ -26,6 +26,10 @@
 # define tmpfile __new_tmpfile
 #endif
 
+#ifndef GEN_THIS
+# define GEN_THIS __GT_FILE
+#endif
+
 /* This returns a new stream opened on a temporary file (generated
    by tmpnam).  The file is opened with mode "w+b" (binary read/write).
    If we couldn't generate a unique filename or the file couldn't
@@ -39,7 +43,7 @@ tmpfile (void)
 
   if (__path_search (buf, FILENAME_MAX, NULL, "tmpf", 0))
     return NULL;
-  fd = __gen_tempname (buf, __GT_FILE);
+  fd = __gen_tempname (buf, GEN_THIS);
   if (fd < 0)
     return NULL;