summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/arbits/slbt_archive_merge.c5
-rw-r--r--src/internal/slibtool_tmpfile_impl.c5
2 files changed, 6 insertions, 4 deletions
diff --git a/src/arbits/slbt_archive_merge.c b/src/arbits/slbt_archive_merge.c
index 5f29235..9068bf6 100644
--- a/src/arbits/slbt_archive_merge.c
+++ b/src/arbits/slbt_archive_merge.c
@@ -180,6 +180,7 @@ int slbt_ar_merge_archives(
int64_t osymrefs;
int64_t onamestrs;
int64_t omemfixup;
+ int64_t atint;
char * base;
unsigned char * ubase;
@@ -359,7 +360,7 @@ int slbt_ar_merge_archives(
memcpy(arhdr,armap->ar_member_data,sizeof(*arhdr)+sarname);
nwritten = armap->ar_file_header.ar_time_date_stamp
- ? sprintf(arhdr->ar_time_date_stamp,PPRII64,time(0))
+ ? sprintf(arhdr->ar_time_date_stamp,PPRII64,(atint = time(0)))
: 0;
if (nwritten < 0)
@@ -401,7 +402,7 @@ int slbt_ar_merge_archives(
memcpy(arhdr,arnames->ar_member_data,sizeof(*arhdr));
nwritten = arnames->ar_file_header.ar_time_date_stamp
- ? sprintf(arhdr->ar_time_date_stamp,PPRII64,time(0))
+ ? sprintf(arhdr->ar_time_date_stamp,PPRII64,(atint = time(0)))
: 0;
if (nwritten < 0)
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);