Date: Wed, 26 Sep 2012 22:09:31 GMT From: Oliver Pinter <oliver.pntr@gmail.com> To: freebsd-gnats-submit@FreeBSD.org Subject: ports/172104: [PATCH] fix kdebase3 build with clang (crypto.cpp) Message-ID: <201209262209.q8QM9VVO077917@red.freebsd.org> Resent-Message-ID: <201209262210.q8QMA5rg074211@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 172104 >Category: ports >Synopsis: [PATCH] fix kdebase3 build with clang (crypto.cpp) >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: Wed Sep 26 22:10:05 UTC 2012 >Closed-Date: >Last-Modified: >Originator: Oliver Pinter >Release: FreeBSD 10-CURRENT >Organization: >Environment: FreeBSD pandora-test 10.0-CURRENT FreeBSD 10.0-CURRENT #2 r+e17c996: Tue Sep 25 20:02:51 CEST 2012 root@pandora-test:/usr/obj/usr/src/sys/OP amd64 >Description: crypto.cpp:2329:8: error: assigning to 'SSL_METHOD *' (aka 'ssl_method_st *') from incompatible type 'const SSL_METHOD *' (aka 'const ssl_method_st *') meth = SSLv2_client_method(); ^ ~~~~~~~~~~~~~~~~~~~~~ crypto.cpp:2341:8: error: assigning to 'SSL_CIPHER *' (aka 'ssl_cipher_st *') from incompatible type 'const SSL_CIPHER *' (aka 'const ssl_cipher_st *') sc = (meth->get_cipher)(i); ^ ~~~~~~~~~~~~~~~~~~~~~ crypto.cpp:2358:8: error: assigning to 'SSL_METHOD *' (aka 'ssl_method_st *') from incompatible type 'const SSL_METHOD *' (aka 'const ssl_method_st *') meth = SSLv3_client_method(); ^ ~~~~~~~~~~~~~~~~~~~~~ crypto.cpp:2369:8: error: assigning to 'SSL_CIPHER *' (aka 'ssl_cipher_st *') from incompatible type 'const SSL_CIPHER *' (aka 'const ssl_cipher_st *') sc = (meth->get_cipher)(i); ^ ~~~~~~~~~~~~~~~~~~~~~ >How-To-Repeat: >Fix: Patch attached with submission follows: --- kdebase-3.5.10/kcontrol/crypto/crypto.cpp.orig 2006-10-01 19:31:49.000000000 +0200 +++ kdebase-3.5.10/kcontrol/crypto/crypto.cpp 2012-09-26 02:33:32.000000000 +0200 @@ -2326,7 +2326,7 @@ SSLv2Box->clear(); SSLv3Box->clear(); - meth = SSLv2_client_method(); + meth = (SSL_METHOD *)SSLv2_client_method(); SSLeay_add_ssl_algorithms(); ctx = SSL_CTX_new(meth); if (ctx == NULL) return false; @@ -2338,7 +2338,7 @@ for (i=0; ; i++) { int j, k; SSL_CIPHER *sc; - sc = (meth->get_cipher)(i); + sc = (SSL_CIPHER *)(meth->get_cipher)(i); if (!sc) break; // Leak of sc*? @@ -2355,7 +2355,7 @@ if (ssl) SSL_free(ssl); // We repeat for SSLv3 - meth = SSLv3_client_method(); + meth = (SSL_METHOD *)SSLv3_client_method(); SSLeay_add_ssl_algorithms(); ctx = SSL_CTX_new(meth); if (ctx == NULL) return false; @@ -2366,7 +2366,7 @@ for (i=0; ; i++) { int j, k; SSL_CIPHER *sc; - sc = (meth->get_cipher)(i); + sc = (SSL_CIPHER *)(meth->get_cipher)(i); if (!sc) break; // Leak of sc*? >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201209262209.q8QM9VVO077917>