summaryrefslogtreecommitdiff
path: root/archivers/rpm4
diff options
context:
space:
mode:
authorJohan van Selst <johans@FreeBSD.org>2011-09-15 16:51:00 +0000
committerJohan van Selst <johans@FreeBSD.org>2011-09-15 16:51:00 +0000
commitb2f06fb4c7cfcb80560d6dde30598c4959872816 (patch)
tree810e1ac6e646f5aa236220b4320e7da4570f9012 /archivers/rpm4
parent- Update to 1.22.2 (diff)
- Fix segmentation faults caused by missing libc function prototypes
Returned pointers could be truncated to (potentially smaller) integers Reported by: will (with detailed analysis)
Notes
Notes: svn path=/head/; revision=281809
Diffstat (limited to 'archivers/rpm4')
-rw-r--r--archivers/rpm4/Makefile1
-rw-r--r--archivers/rpm4/files/patch-system.h7
-rw-r--r--archivers/rpm4/files/patch-tools_javadeps.c10
3 files changed, 17 insertions, 1 deletions
diff --git a/archivers/rpm4/Makefile b/archivers/rpm4/Makefile
index 290b07f9c7c9..252c50020e6b 100644
--- a/archivers/rpm4/Makefile
+++ b/archivers/rpm4/Makefile
@@ -6,6 +6,7 @@
PORTNAME= rpm
PORTVERSION= 4.9.1.1
+PORTREVISION= 1
CATEGORIES= archivers
MASTER_SITES= http://rpm.org/releases/rpm-${PORTVERSION:R:R}.x/ \
ftp://ftp.mirrorservice.org/sites/ftp.rpm.org/pub/rpm/dist/rpm-${PORTVERSION:E}.x/
diff --git a/archivers/rpm4/files/patch-system.h b/archivers/rpm4/files/patch-system.h
index 53fbda2846e3..087025591e2a 100644
--- a/archivers/rpm4/files/patch-system.h
+++ b/archivers/rpm4/files/patch-system.h
@@ -1,10 +1,15 @@
--- system.h.orig 2011-06-10 15:27:05.000000000 +0200
+++ system.h 2011-06-10 15:27:09.000000000 +0200
-@@ -39,6 +39,8 @@ char * stpncpy(char * dest, const char *
+@@ -39,6 +39,13 @@ char * stpncpy(char * dest, const char *
#define getenv(_s) __secure_getenv(_s)
#endif
++/* Add includes for missing libc prototypes */
++#include <ctype.h>
++#include <string.h>
++#include <libgen.h>
+#include <sys/wait.h>
++#include <netinet/in.h>
+
#ifdef HAVE_FCNTL_H
#include <fcntl.h>
diff --git a/archivers/rpm4/files/patch-tools_javadeps.c b/archivers/rpm4/files/patch-tools_javadeps.c
new file mode 100644
index 000000000000..77a06f2e7d78
--- /dev/null
+++ b/archivers/rpm4/files/patch-tools_javadeps.c
@@ -0,0 +1,10 @@
+--- tools/javadeps.c.orig 2011-09-14 23:09:48.000000000 +0200
++++ tools/javadeps.c 2011-09-14 23:09:50.000000000 +0200
+@@ -57,6 +57,7 @@
+ #include <netdb.h>
+ #include <rpm/rpmutil.h>
+ #include <ctype.h>
++#include <netinet/in.h>
+ #include "debug.h"
+
+ /*---------typedefs---------*/