aboutsummaryrefslogtreecommitdiffstats
path: root/net/httping
diff options
context:
space:
mode:
authorehaupt <ehaupt@FreeBSD.org>2010-07-31 21:45:39 +0800
committerehaupt <ehaupt@FreeBSD.org>2010-07-31 21:45:39 +0800
commit4b77468864f7d3bae294947d78c119bedc3a46de (patch)
treecefce9b1775a7c3d0fb5bfb4eb75665cc46a6b28 /net/httping
parentec841f374a7a52330db178fb133458352eff6e00 (diff)
downloadfreebsd-ports-gnome-4b77468864f7d3bae294947d78c119bedc3a46de.tar.gz
freebsd-ports-gnome-4b77468864f7d3bae294947d78c119bedc3a46de.tar.zst
freebsd-ports-gnome-4b77468864f7d3bae294947d78c119bedc3a46de.zip
Fix build on OSVERSION prior to 701101
Notified by: pav (pointyhat)
Diffstat (limited to 'net/httping')
-rw-r--r--net/httping/Makefile2
-rw-r--r--net/httping/files/extrapatch-mssl.c20
2 files changed, 22 insertions, 0 deletions
diff --git a/net/httping/Makefile b/net/httping/Makefile
index 525d439f6848..95ea9e02b5c5 100644
--- a/net/httping/Makefile
+++ b/net/httping/Makefile
@@ -25,6 +25,8 @@ PLIST_FILES= bin/httping
.if(${OSVERSION} >= 701101)
CFLAGS+= -D_GNU_SOURCE
+.else
+EXTRA_PATCHES= ${FILESDIR}/extrapatch-mssl.c
.endif
do-install:
diff --git a/net/httping/files/extrapatch-mssl.c b/net/httping/files/extrapatch-mssl.c
new file mode 100644
index 000000000000..13ca1822ba0b
--- /dev/null
+++ b/net/httping/files/extrapatch-mssl.c
@@ -0,0 +1,20 @@
+--- ./mssl.c.orig 2010-07-31 15:40:14.760757000 +0200
++++ ./mssl.c 2010-07-31 15:40:31.439062000 +0200
+@@ -28,6 +28,17 @@
+ extern char last_error[];
+ BIO *bio_err=0;
+
++char * strndup(const char *str, size_t len){
++ size_t l=strlen(str);
++ char *r;
++ if(len<l){
++ l=len;
++ }
++ r=malloc(l);
++ memcpy(r, str, l);
++ return r;
++}
++
+ char close_ssl_connection(SSL *ssl_h, int socket_h)
+ {
+ int rc = SSL_shutdown(ssl_h);