summaryrefslogtreecommitdiff
path: root/src/internal
diff options
context:
space:
mode:
Diffstat (limited to 'src/internal')
-rw-r--r--src/internal/slibtool_tmpfile_impl.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/internal/slibtool_tmpfile_impl.c b/src/internal/slibtool_tmpfile_impl.c
index 52c7317..3ed7d3a 100644
--- a/src/internal/slibtool_tmpfile_impl.c
+++ b/src/internal/slibtool_tmpfile_impl.c
@@ -61,6 +61,7 @@ slbt_hidden int slbt_tmpfile(void)
{
int fd;
void * addr;
+ int64_t tint;
char tmplate[128];
/* try with __fs_tmpfile() */
@@ -73,6 +74,7 @@ slbt_hidden int slbt_tmpfile(void)
/* fallback to mk{o}stemp */
addr = tmplate;
+ tint = time(0);
memset(tmplate,0,sizeof(tmplate));
snprintf(tmplate,sizeof(tmplate),
"/tmp/"
@@ -81,8 +83,7 @@ slbt_hidden int slbt_tmpfile(void)
".salt.%p"
".pid.%d"
".XXXXXXXXXXXX",
- time(0),
- addr,
+ tint,addr,
getpid());
return slbt_mkostemp(tmplate);