ports/171196: fix nzbget-0.8.0 build with current OpenSSL

freebsd at nagilum.org freebsd at nagilum.org
Fri Aug 31 07:50:05 UTC 2012


>Number:         171196
>Category:       ports
>Synopsis:       fix nzbget-0.8.0 build with current OpenSSL
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Aug 31 07:50:04 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator:     freebsd at nagilum.org
>Release:        FreeBSD 10.0-CURRENT i386
>Organization:
>Environment:
System: FreeBSD cakebox.tis 10.0-CURRENT FreeBSD 10.0-CURRENT #0: Wed Aug 29 13:01:13 CEST 2012 root at cakebox.tis:/usr/obj/export/src/sys/net5501 i386


>Description:
	nzbget-0.8.0 fails to compile with OpenSSL1.0 and later:

if c++ -DHAVE_CONFIG_H -I. -I. -I.    -I/usr/local/include -I/usr/local/include/libxml2 -I/usr/local/include  -I/usr/include -I/usr/local/include/sigc++-2.0 -I/usr/local/lib/sigc++-2.0/include  -I/usr/include -I/usr/include  -Os -O2 -pipe -march=pentium -mtune=pentium -fno-strict-aliasing -MT TLS.o -MD -MP -MF ".deps/TLS.Tpo" -c -o TLS.o TLS.cpp;  then mv -f ".deps/TLS.Tpo" ".deps/TLS.Po"; else rm -f ".deps/TLS.Tpo"; exit 1; fi
TLS.cpp: In function 'int tls_check_cert(tls_t*, const char*, int, char**)':
TLS.cpp:911: error: 'STACK' was not declared in this scope
TLS.cpp:911: error: 'subj_alt_names' was not declared in this scope
TLS.cpp:963: error: expected primary-expression before ')' token
TLS.cpp:963: error: expected `)' before 'X509_get_ext_d2i'
TLS.cpp:1564: error: expected `)' at end of input
TLS.cpp:1564: error: expected statement at end of input
TLS.cpp:1564: error: expected `}' at end of input
*** [TLS.o] Error code 1

Stop in /var/tmp/export/ports/news/nzbget/work/nzbget-0.8.0.
gmake: *** [all] Error 1
*** [do-build] Error code 1

Stop in /export/ports/news/nzbget.
*** [build] Error code 1

Stop in /export/ports/news/nzbget.

>How-To-Repeat:
	Build nzbget.

>Fix:

	Apply attached patch.
	Obtained from: https://dev.openwrt.org/ticket/8893

--- nzbget.patch begins here ---
diff -Naur nzbget.old/files/patch-TLS.cpp nzbget/files/patch-TLS.cpp
--- nzbget.old/files/patch-TLS.cpp	1970-01-01 01:00:00.000000000 +0100
+++ nzbget/files/patch-TLS.cpp	2012-08-31 09:31:06.000000000 +0200
@@ -0,0 +1,32 @@
+--- TLS.cpp.orig	2011-06-14 23:47:22.000000000 +0200
++++ TLS.cpp	2012-08-31 09:27:41.000000000 +0200
+@@ -908,7 +908,7 @@
+     char *buf;
+     int bufsize;
+     /* needed to get the DNS subjectAltNames: */
+-    STACK *subj_alt_names;
++    STACK_OF(GENERAL_NAME) *subj_alt_names;
+     int subj_alt_names_count;
+     GENERAL_NAME *subj_alt_name;
+     /* did we find a name matching hostname? */
+@@ -960,7 +960,7 @@
+     /* Try the DNS subjectAltNames. */
+     match_found = 0;
+     if ((subj_alt_names =
+-		(STACK*)X509_get_ext_d2i(x509cert, NID_subject_alt_name, NULL, NULL)))
++		(STACK_OF(GENERAL_NAME) *)X509_get_ext_d2i(x509cert, NID_subject_alt_name, NULL, NULL)))
+     {
+ 	subj_alt_names_count = sk_GENERAL_NAME_num(subj_alt_names);
+ 	for (i = 0; i < subj_alt_names_count; i++) 
+@@ -1105,7 +1105,11 @@
+ 
+ #ifdef HAVE_OPENSSL
+     
++    #if OPENSSL_VERSION_NUMBER >= 0x10000000L
++    const SSL_METHOD *ssl_method = NULL;
++    #else
+     SSL_METHOD *ssl_method = NULL;
++    #endif
+     
+     ssl_method = force_sslv3 ? SSLv3_client_method() : SSLv23_client_method();
+     if (!ssl_method)
--- nzbget.patch ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list