From mwisnicki@gmail.com  Wed Oct 31 02:38:27 2007
Return-Path: <mwisnicki@gmail.com>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 8EABC16A419
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 31 Oct 2007 02:38:27 +0000 (UTC)
	(envelope-from mwisnicki@gmail.com)
Received: from hu-out-0506.google.com (hu-out-0506.google.com [72.14.214.225])
	by mx1.freebsd.org (Postfix) with ESMTP id 095B113C4B5
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 31 Oct 2007 02:38:26 +0000 (UTC)
	(envelope-from mwisnicki@gmail.com)
Received: by hu-out-0506.google.com with SMTP id 28so1300193hub
        for <FreeBSD-gnats-submit@freebsd.org>; Tue, 30 Oct 2007 19:38:12 -0700 (PDT)
Received: by 10.67.88.4 with SMTP id q4mr728089ugl.1193798292488;
        Tue, 30 Oct 2007 19:38:12 -0700 (PDT)
Received: from ghost.pnet.one.pl ( [84.40.242.20])
        by mx.google.com with ESMTPS id q40sm2698104ugc.2007.10.30.19.38.10
        (version=TLSv1/SSLv3 cipher=OTHER);
        Tue, 30 Oct 2007 19:38:11 -0700 (PDT)
Received: by ghost.pnet.one.pl (sSMTP sendmail emulation); Wed, 31 Oct 2007 03:38:08 +0100
Message-Id: <4727ea93.2876420a.5a37.738b@mx.google.com>
Date: Wed, 31 Oct 2007 03:38:08 +0100
From: Marcin Wisnicki <mwisnicki+freebsd@gmail.com>
Sender: =?UTF-8?B?TWFyY2luIFdpxZtuaWNraQ==?= <mwisnicki@gmail.com>
Reply-To: Marcin Wisnicki <mwisnicki+freebsd@gmail.com>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: Base openssl does not define OPENSSL_THREADS
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         117709
>Category:       kern
>Synopsis:       [libcrypto] [patch] Base openssl does not define OPENSSL_THREADS
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    simon
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Oct 31 02:40:00 UTC 2007
>Closed-Date:    Tue Feb 22 19:30:34 EST 2011
>Last-Modified:  Tue Feb 22 19:30:34 EST 2011
>Originator:     Marcin Wisnicki
>Release:        FreeBSD 6.2-STABLE i386
>Organization:
>Environment:
System: FreeBSD ghost.pnet.one.pl 6.2-STABLE FreeBSD 6.2-STABLE #9: Sun Sep 9 04:53:53 CEST 2007 root@ghost.pnet.one.pl:/home/obj/usr/src/sys/SERWER i386


	RELENG_6
>Description:
	Version of OpenSSL in base system of RELENG_[456] lacks definition of
	OPENSSL_THREADS, and only defines THREADS.
	It was previously discussed in 2003 in this thread:
	http://docs.freebsd.org/cgi/getmsg.cgi?fetch=473927+0+archive/2003/freebsd-current/20030302.freebsd-current

	This will fix openssl detection in some ports, most notably in
	mail-notification-4.1 which i'm going to submit right now with a hack to
	support older freebsd releases.

>How-To-Repeat:

>Fix:

	Apply following patch, relative to /usr/src/secure/lib or MFC openssl

--- openssl-threads.patch begins here ---
diff -ruN libcrypto.orig/opensslconf-alpha.h libcrypto/opensslconf-alpha.h
--- libcrypto.orig/opensslconf-alpha.h	2003-01-29 02:06:15.000000000 +0100
+++ libcrypto/opensslconf-alpha.h	2007-10-31 03:12:57.000000000 +0100
@@ -12,6 +12,9 @@
 #  define THREADS
 # endif
 #endif
+#ifndef OPENSSL_THREADS
+# define OPENSSL_THREADS
+#endif
 #ifdef OPENSSL_OTHER_DEFINES
 # ifndef NO_ASM
 #  define NO_ASM
diff -ruN libcrypto.orig/opensslconf-amd64.h libcrypto/opensslconf-amd64.h
--- libcrypto.orig/opensslconf-amd64.h	2003-01-29 02:06:15.000000000 +0100
+++ libcrypto/opensslconf-amd64.h	2007-10-31 03:13:13.000000000 +0100
@@ -12,6 +12,9 @@
 #  define THREADS
 # endif
 #endif
+#ifndef OPENSSL_THREADS
+# define OPENSSL_THREADS
+#endif
 #ifdef OPENSSL_OTHER_DEFINES
 # ifndef NO_ASM
 #  define NO_ASM
diff -ruN libcrypto.orig/opensslconf-arm.h libcrypto/opensslconf-arm.h
--- libcrypto.orig/opensslconf-arm.h	2004-05-14 14:26:51.000000000 +0200
+++ libcrypto/opensslconf-arm.h	2007-10-31 03:13:31.000000000 +0100
@@ -12,6 +12,9 @@
 #  define THREADS
 # endif
 #endif
+#ifndef OPENSSL_THREADS
+# define OPENSSL_THREADS
+#endif
 #ifdef OPENSSL_OTHER_DEFINES
 # ifndef NO_ASM
 #  define NO_ASM
diff -ruN libcrypto.orig/opensslconf-i386.h libcrypto/opensslconf-i386.h
--- libcrypto.orig/opensslconf-i386.h	2003-01-29 02:06:15.000000000 +0100
+++ libcrypto/opensslconf-i386.h	2007-10-31 03:12:43.000000000 +0100
@@ -12,6 +12,9 @@
 #  define THREADS
 # endif
 #endif
+#ifndef OPENSSL_THREADS
+# define OPENSSL_THREADS
+#endif
 #ifdef OPENSSL_OTHER_DEFINES
 # ifndef NO_ASM
 #  define NO_ASM
diff -ruN libcrypto.orig/opensslconf-ia64.h libcrypto/opensslconf-ia64.h
--- libcrypto.orig/opensslconf-ia64.h	2003-01-29 02:06:15.000000000 +0100
+++ libcrypto/opensslconf-ia64.h	2007-10-31 03:13:48.000000000 +0100
@@ -12,6 +12,9 @@
 #  define THREADS
 # endif
 #endif
+#ifndef OPENSSL_THREADS
+# define OPENSSL_THREADS
+#endif
 #ifdef OPENSSL_OTHER_DEFINES
 # ifndef NO_ASM
 #  define NO_ASM
diff -ruN libcrypto.orig/opensslconf-powerpc.h libcrypto/opensslconf-powerpc.h
--- libcrypto.orig/opensslconf-powerpc.h	2003-01-29 02:06:15.000000000 +0100
+++ libcrypto/opensslconf-powerpc.h	2007-10-31 03:14:44.000000000 +0100
@@ -12,6 +12,9 @@
 #  define THREADS
 # endif
 #endif
+#ifndef OPENSSL_THREADS
+# define OPENSSL_THREADS
+#endif
 #ifdef OPENSSL_OTHER_DEFINES
 # ifndef NO_ASM
 #  define NO_ASM
diff -ruN libcrypto.orig/opensslconf-sparc64.h libcrypto/opensslconf-sparc64.h
--- libcrypto.orig/opensslconf-sparc64.h	2003-01-29 02:06:15.000000000 +0100
+++ libcrypto/opensslconf-sparc64.h	2007-10-31 03:14:58.000000000 +0100
@@ -12,6 +12,9 @@
 #  define THREADS
 # endif
 #endif
+#ifndef OPENSSL_THREADS
+# define OPENSSL_THREADS
+#endif
 #ifdef OPENSSL_OTHER_DEFINES
 # ifndef NO_ASM
 #  define NO_ASM
--- openssl-threads.patch ends here ---


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->simon 
Responsible-Changed-By: matteo 
Responsible-Changed-When: Lun 28 Gen 2008 15:45:29 UTC 
Responsible-Changed-Why:  
Simon is our OpenSSL maintainer, so he probably knows better. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=117709 

From: =?UTF-8?Q?Marcin_Wi=C5=9Bnicki?= <mwisnicki@gmail.com>
To: bug-followup <bug-followup@FreeBSD.org>, 
	"mwisnicki+freebsd" <mwisnicki+freebsd@gmail.com>
Cc:  
Subject: Re: kern/117709: [libcrypto] [patch] Base openssl does not define OPENSSL_THREADS
Date: Sun, 19 Dec 2010 13:47:23 +0100

 This PR can now be closed since all affected branches reached EOL.
State-Changed-From-To: open->closed 
State-Changed-By: eadler 
State-Changed-When: Tue Feb 22 19:29:46 EST 2011 
State-Changed-Why:  
no affected release is currently supported 

http://www.freebsd.org/cgi/query-pr.cgi?pr=117709 
>Unformatted:
