$OpenBSD: patch-src_openssl_c,v 1.4 2011/10/12 10:14:30 dcoppa Exp $ Fix build with GCC2. --- src/openssl.c.orig Thu Oct 6 09:42:04 2011 +++ src/openssl.c Thu Oct 6 09:43:29 2011 @@ -498,6 +498,8 @@ ssl_check_certificate (int fd, const char *host) bool success = true; bool alt_name_checked = false; + 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"); @@ -646,7 +648,7 @@ ssl_check_certificate (int fd, const char *host) if (alt_name_checked == false) { /* Test commomName */ - 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));