summaryrefslogtreecommitdiff
path: root/grp/tst_fgetgrent.c
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2018-12-27 19:01:57 +0000
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2018-12-27 19:01:57 +0000
commitcab56836b146bc129f1ad43f0393d95a9deca63a (patch)
tree4f4e655319bbac78fca170da05275c127429b460 /grp/tst_fgetgrent.c
parent04ac1241a4cd004872282c2c82ec37fa33925292 (diff)
parent82dd75a7f436a19047325d62182590c9f9e23a78 (diff)
Merge branch 't/tls' into refs/top-bases/t/tls-threadvar
Diffstat (limited to 'grp/tst_fgetgrent.c')
-rw-r--r--grp/tst_fgetgrent.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/grp/tst_fgetgrent.c b/grp/tst_fgetgrent.c
index 66717ed591..d612445fed 100644
--- a/grp/tst_fgetgrent.c
+++ b/grp/tst_fgetgrent.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1999-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Andreas Jaeger <aj@arthur.rhein-neckar.de>, 1999.
@@ -21,6 +21,7 @@
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
+#include <unistd.h>
static int errors;
@@ -99,7 +100,14 @@ test_fgetgrent (const char *filename)
int
main (int argc, char *argv[])
{
- char *file = tmpnam (NULL);
+ char file[] = "/tmp/tst_fgetgrent.XXXXXX";
+ int fd = mkstemp (file);
+ if (fd == -1)
+ {
+ printf ("mkstemp failed: %m\n");
+ return 1;
+ }
+ close (fd);
int i = 0;
if (argc > 1)