Browse Source

don't use stdio

Signed-off-by: Graham MacDonald <grahamamacdonald@gmail.com>
Graham MacDonald 4 years ago
parent
commit
59483fbfbe
1 changed files with 1 additions and 2 deletions
  1. 1 2
      sys/src/regress/libc/readoffset.c

+ 1 - 2
sys/src/regress/libc/readoffset.c

@@ -1,6 +1,5 @@
 #include <u.h>
 #include <libc.h>
-#include <stdio.h>
 
 // Based on TestReadAtOffset in go's test suite.
 // Plan 9 pread had a bug where the channel offset we updated during a call to
@@ -34,7 +33,7 @@ preadn(int fd, char *buf, int32_t nbytes, int64_t offset)
 void
 main(int argc, char *argv[])
 {
-	tmpfilename = tmpnam(nil);
+	tmpfilename = mktemp("readoffset");
 	int fd = create(tmpfilename, ORDWR, 0666);
 	if (fd < 0) {
 		print("FAIL: couldn't create file: %s\n", tmpfilename);