PR:		208704
Submitted by:	tkato432 yahoo com
Sponsored by:	Absolight
This commit is contained in:
Mathieu Arnold 2016-04-13 10:38:52 +00:00
parent ef7f58498f
commit cfed473897
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=413187
2 changed files with 27 additions and 27 deletions

View file

@ -12,15 +12,11 @@ COMMENT= Extractor from uuencoded files
BUILD_DEPENDS= nkf:japanese/nkf
USES= lha
USES= dos2unix lha
DOS2UNIX_FILES= uudx.1 uudx.c
NO_WRKSUBDIR= yes
MAKEFILE= ${FILESDIR}/Makefile
PLIST_FILES= bin/uudx \
man/ja/man1/uudx.1.gz
pre-patch:
@${CP} ${FILESDIR}/Makefile ${WRKSRC}
post-patch:
@${REINPLACE_CMD} -e '/sprintf()/d' ${WRKSRC}/uudx.c
.include <bsd.port.mk>

View file

@ -1,23 +1,27 @@
--- uudx.c.orig Sun Jan 29 16:44:42 1995
+++ uudx.c Sat Feb 12 19:31:31 2000
@@ -89,7 +89,11 @@
#else
#define strchr index
extern char *strchr();
--- uudx.c.orig 2016-04-13 10:36:35 UTC
+++ uudx.c
@@ -87,10 +87,15 @@ struct utimbuf {
#if !BSD
#include <string.h>
#else
+#if !defined(__FreeBSD__) && !defined(__OpenBSD__) && !defined(__NetBSD__)
extern char *sprintf();
#define strchr index
extern char *strchr();
extern char *sprintf();
extern char *strcpy();
+#else
+extern int sprintf();
+#include <string.h>
+#include <unistd.h>
+#endif
extern char *strcpy();
#endif /* BSD */
@@ -346,7 +350,7 @@
norm_dir(work_file_name, p);
}
strcat(work_file_name, "udXXXXXX");
- if (mktemp(work_file_name) == NULL) {
+ if (mkstemp(work_file_name) == NULL) {
cant("make", "work_file_name", 1);
/* NOTREACHED */
}
#endif /* BSD */
#define NAMLEN 256
@@ -346,7 +351,7 @@ main(int argc, char *argv[])
norm_dir(work_file_name, p);
}
strcat(work_file_name, "udXXXXXX");
- if (mktemp(work_file_name) == NULL) {
+ if (mkstemp(work_file_name) == NULL) {
cant("make", "work_file_name", 1);
/* NOTREACHED */
}