1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-10-20 20:09:11 +00:00

Fix build on OSVERSION prior to 701101

Notified by:	pav (pointyhat)
This commit is contained in:
Emanuel Haupt 2010-07-31 13:45:39 +00:00
parent 609ea11a8d
commit 4e64d395f3
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=258528
2 changed files with 22 additions and 0 deletions

View File

@ -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:

View File

@ -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);