Skip to content

Commit

Permalink
security/p5-Crypt-SSLeay: fix build with clang 15
Browse files Browse the repository at this point in the history
During an exp-run for llvm 15 (see bug 265425), it turned out that
security/p5-Crypt-SSLeay failed to build with clang 15:

  SSLeay.xs:159:31: warning: call to undeclared function 'SSLv2_client_method'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
              ctx = SSL_CTX_new(SSLv2_client_method());
                                ^
  SSLeay.xs:159:31: error: incompatible integer to pointer conversion passing 'int' to parameter of type 'const SSL_METHOD *' (aka 'const struct ssl_method_st *') [-Wint-conversion]
              ctx = SSL_CTX_new(SSLv2_client_method());
                                ^~~~~~~~~~~~~~~~~~~~~

This is because SSLeay.xs uses the obsolete define OPENSSL_NO_SSL2 to
determine whether OpenSSL still supports SSLv2. Since this define was
removed from OpenSSL 1.1 and later, define it via CFLAGS instead.

PR:		268258
Approved by:	portmgr (tcberner)
MFH:		2022Q4
  • Loading branch information
DimitryAndric committed Dec 18, 2022
1 parent d5e379f commit 6597d3e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions security/p5-Crypt-SSLeay/Makefile
Expand Up @@ -20,6 +20,7 @@ USES= perl5 ssl
USE_PERL5= configure
CONFIGURE_ARGS= --no-live-tests
CFLAGS+= -I${OPENSSLINC}
CFLAGS+= -DOPENSSL_NO_SSL2

post-install:
${STRIP_CMD} ${STAGEDIR}${PREFIX}/${SITE_ARCH_REL}/auto/Crypt/SSLeay/SSLeay.so
Expand Down

0 comments on commit 6597d3e

Please sign in to comment.