diff options
author | mi <mi@FreeBSD.org> | 2001-08-16 06:41:46 +0800 |
---|---|---|
committer | mi <mi@FreeBSD.org> | 2001-08-16 06:41:46 +0800 |
commit | bb79ece14967fe43fcc5adf4d00c1955bb6ad67e (patch) | |
tree | 827fb6ddd0780fa8b10feae77f235842b2703535 /news/knews | |
parent | bc9eb5e987b105715e555246c7124a5071960113 (diff) | |
download | freebsd-ports-gnome-bb79ece14967fe43fcc5adf4d00c1955bb6ad67e.tar.gz freebsd-ports-gnome-bb79ece14967fe43fcc5adf4d00c1955bb6ad67e.tar.zst freebsd-ports-gnome-bb79ece14967fe43fcc5adf4d00c1955bb6ad67e.zip |
Fix a bug in my patch, which caused the temporary file to be unlinked
unfairly. Thanks, Alex!
Submitted by: Alexander Leidinger
Diffstat (limited to 'news/knews')
-rw-r--r-- | news/knews/Makefile | 9 | ||||
-rw-r--r-- | news/knews/files/patch-file.c | 7 |
2 files changed, 9 insertions, 7 deletions
diff --git a/news/knews/Makefile b/news/knews/Makefile index 8d3ce187c76b..eacc2bc5edd8 100644 --- a/news/knews/Makefile +++ b/news/knews/Makefile @@ -7,21 +7,24 @@ PORTNAME= knews PORTVERSION= 1.0b.1 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= news MASTER_SITES= http://www.matematik.su.se/~kjj/ MAINTAINER= ports@FreeBSD.org LIB_DEPENDS= jpeg.9:${PORTSDIR}/graphics/jpeg \ - png.4:${PORTSDIR}/graphics/png -# compface:${PORTSDIR}/mail/faces + png.4:${PORTSDIR}/graphics/png \ + compface:${PORTSDIR}/mail/faces RUN_DEPENDS= newsp:${PORTSDIR}/print/mp-letter USE_IMAKE= yes USE_XPM= yes MAKE_FLAGS= BINDIR=${PREFIX}/bin MANDIR=${PREFIX}/man/man1 \ XAPPLOADDIR=${PREFIX}/lib/X11/app-defaults -f +.if defined(MAKE_JOBS) +MAKE_ARGS+= -j${MAKE_JOBS} +.endif MAN1= knews.1 .include <bsd.port.mk> diff --git a/news/knews/files/patch-file.c b/news/knews/files/patch-file.c index 7a3409474641..83d1cd661508 100644 --- a/news/knews/files/patch-file.c +++ b/news/knews/files/patch-file.c @@ -4,7 +4,7 @@ Use mkstemp instead of tmpnam. Copied from the tmpnam implementation :) --- src/file.c Fri Jan 9 12:16:19 1998 +++ src/file.c Fri Jul 13 10:41:01 2001 -@@ -187,13 +187,12 @@ +@@ -187,13 +187,11 @@ int fd; + static unsigned long tmpcount; + static char buf[L_tmpnam]; @@ -18,11 +18,10 @@ Use mkstemp instead of tmpnam. Copied from the tmpnam implementation :) + fd = mkstemp(buf); + if (fd < 0) + *name = NULL; -+ else - unlink(*name); +- unlink(*name); - fd = open(*name, O_RDWR|O_CREAT|O_EXCL, S_IRUSR|S_IWUSR); - if (fd < 0) - *name = NULL; - } -- + return fd; |