gcc2 build fixes:

- macro with variable declarations not at the begging of block
- branch prediction hints not available in gcc2

ok fkr@
This commit is contained in:
martin 2009-03-08 15:56:52 +00:00
parent 59acbac1ab
commit a3e1a41274
3 changed files with 40 additions and 2 deletions

View File

@ -1,10 +1,10 @@
# $OpenBSD: Makefile,v 1.20 2008/11/27 11:38:32 fkr Exp $
# $OpenBSD: Makefile,v 1.21 2009/03/08 15:56:52 martin Exp $
COMMENT= easy-to-use, robust, and highly configurable VPN
VERSION= 2.1_rc15
DISTNAME= openvpn-${VERSION}
PKGNAME= ${DISTNAME:S/_//g}
PKGNAME= ${DISTNAME:S/_//g}p0
CATEGORIES= net security
HOMEPAGE= http://openvpn.net/

View File

@ -0,0 +1,26 @@
$OpenBSD: patch-ssl_c,v 1.1 2009/03/08 15:56:52 martin Exp $
--- ssl.c.orig Fri Mar 6 13:38:02 2009
+++ ssl.c Fri Mar 6 13:46:09 2009
@@ -3398,14 +3398,17 @@ key_method_2_read (struct buffer *buf, struct tls_mult
if ((session->opt->ssl_flags & SSLF_USERNAME_AS_COMMON_NAME))
set_common_name (session, up->username);
- msg (D_HANDSHAKE, "TLS: Username/Password authentication %s for username '%s' %s",
#ifdef ENABLE_DEF_AUTH
- ks->auth_deferred ? "deferred" : "succeeded",
+ msg (D_HANDSHAKE,
+ "TLS: Username/Password authentication %s for username '%s' %s",
+ ks->auth_deferred ? "deferred" : "succeeded", up->username,
+ (session->opt->ssl_flags & SSLF_USERNAME_AS_COMMON_NAME) ? "[CN SET]" : "");
#else
- "succeeded",
+ msg (D_HANDSHAKE,
+ "TLS: Username/Password authentication %s for username '%s' %s",
+ "succeeded", up->username,
+ (session->opt->ssl_flags & SSLF_USERNAME_AS_COMMON_NAME) ? "[CN SET]" : "");
#endif
- up->username,
- (session->opt->ssl_flags & SSLF_USERNAME_AS_COMMON_NAME) ? "[CN SET]" : "");
}
else
{

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-syshead_h,v 1.1 2009/03/08 15:56:52 martin Exp $
--- syshead.h.orig Fri Mar 6 13:56:33 2009
+++ syshead.h Fri Mar 6 13:56:47 2009
@@ -37,7 +37,7 @@
#endif
/* branch prediction hints */
-#if defined(__GNUC__)
+#if defined(__GNUC__) && __GNUC__ >= 3
# define likely(x) __builtin_expect((x),1)
# define unlikely(x) __builtin_expect((x),0)
#else