- fix build with gcc2

This commit is contained in:
jasper 2010-09-07 20:54:48 +00:00
parent 59292c86a6
commit b2343b8c5f
2 changed files with 48 additions and 0 deletions

View File

@ -0,0 +1,24 @@
$OpenBSD: patch-src_openssl_c,v 1.3 2010/09/07 20:54:48 jasper Exp $
Fix build with GCC2.
--- src/openssl.c.orig Tue Sep 7 14:41:11 2010
+++ src/openssl.c Tue Sep 7 14:42:44 2010
@@ -490,6 +490,8 @@ ssl_check_certificate (int fd, const char *host)
long vresult;
bool success = true;
+ X509_NAME *xname;
+
/* If the user has specified --no-check-cert, we still want to warn
him about problems with the server's certificate. */
const char *severity = opt.check_cert ? _("ERROR") : _("WARNING");
@@ -569,7 +571,7 @@ ssl_check_certificate (int fd, const char *host)
- Ensure that ASN1 strings from the certificate are encoded as
UTF-8 which can be meaningfully compared to HOST. */
- X509_NAME *xname = X509_get_subject_name(cert);
+ xname = X509_get_subject_name(cert);
common_name[0] = '\0';
X509_NAME_get_text_by_NID (xname, NID_commonName, common_name,
sizeof (common_name));

View File

@ -0,0 +1,24 @@
$OpenBSD: patch-src_sysdep_h,v 1.1 2010/09/07 20:54:48 jasper Exp $
Fix build with GCC2 where the configure test fails
to pickup stdbool.h. So it creates the lib/stdbool.h
which these definitions would override.
--- src/sysdep.h.orig Tue Sep 7 14:28:56 2010
+++ src/sysdep.h Tue Sep 7 14:32:01 2010
@@ -136,6 +136,7 @@ void *alloca (size_t);
#if HAVE_STDBOOL_H
# include <stdbool.h>
#else
+# if !(defined(__GNUC__) && __GNUC__ < 3)
# if ! HAVE__BOOL
# ifdef __cplusplus
typedef bool _Bool;
@@ -147,6 +148,7 @@ typedef unsigned char _Bool;
# define false 0
# define true 1
# define __bool_true_false_are_defined 1
+#endif
#endif
/* Needed for compilation under OS/2 and MSDOS */