SecBSD's official ports repository
This commit is contained in:
commit
2c0afcbbf3
64331 changed files with 5339189 additions and 0 deletions
17
plan9/wily/patches/patch-wily_text2_c
Normal file
17
plan9/wily/patches/patch-wily_text2_c
Normal file
|
@ -0,0 +1,17 @@
|
|||
--- wily/text2.c.orig Sat Apr 11 13:21:28 1998
|
||||
+++ wily/text2.c Sat May 24 13:12:29 2003
|
||||
@@ -136,11 +136,12 @@ text_write(Text *t, char *fname) {
|
||||
int
|
||||
text_fd(Text *t, Range sel)
|
||||
{
|
||||
- char *file = tmpnam(0);
|
||||
+ char file[40];
|
||||
int fd;
|
||||
int input;
|
||||
|
||||
- if ((fd = open(file, O_WRONLY|O_CREAT, 0600)) < 0) {
|
||||
+ sprintf(file, "ff.XXXXXXXX");
|
||||
+ if ((fd = mkstemp(file)) < 0) {
|
||||
perror("open temp file");
|
||||
(void) unlink(file);
|
||||
return(-1);
|
Loading…
Add table
Add a link
Reference in a new issue