summaryrefslogtreecommitdiff
path: root/6/main.c
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2015-01-20 13:33:19 -0800
committerOri Bernstein <ori@eigenstate.org>2015-01-20 13:33:19 -0800
commitd99446a4eb050905981afd2c9f58341f739eba64 (patch)
tree08707efc417980575fac478323ecd499886c1af8 /6/main.c
parent61a9e807de75f67fd5467aa671b00935d202f0e3 (diff)
downloadmc-d99446a4eb050905981afd2c9f58341f739eba64.tar.gz
Add missing stdarg.h includes.
Diffstat (limited to '6/main.c')
-rw-r--r--6/main.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/6/main.c b/6/main.c
index f328479..db850ae 100644
--- a/6/main.c
+++ b/6/main.c
@@ -1,5 +1,6 @@
#include <stdlib.h>
#include <stdio.h>
+#include <stdarg.h>
#include <inttypes.h>
#include <ctype.h>
#include <string.h>
@@ -111,8 +112,7 @@ static char *gentemp(char *buf, size_t bufsz, char *path, char *suffix)
else
base = path;
gettimeofday(&tv, NULL);
- srand(tv.tv_usec);
- snprintf(buf, bufsz, "%s/tmp%lx%lx-%s%s", tmpdir, (long)rand(), (long)tv.tv_usec, base, suffix);
+ snprintf(buf, bufsz, "%s/tmp%lx%lx-%s%s", tmpdir, (long)tv.tv_sec, (long)tv.tv_usec, base, suffix);
return buf;
}