[Libwebsockets] compile warning - undefined function

Jaco Kroon jaco at uls.co.za
Fri Mar 13 17:49:26 CET 2020


Hi Andy,

https://bugs.gentoo.org/709508 relates.

/var/tmp/portage/net-libs/libwebsockets-3.2.1/work/libwebsockets-3.2.1/lib/tls/openssl/lws-genec.c: In function ‘BN_bn2binpad’:
/var/tmp/portage/net-libs/libwebsockets-3.2.1/work/libwebsockets-3.2.1/lib/tls/openssl/lws-genec.c:61:5: error: implicit declaration of function ‘bn_check_top’ [-Werror=implicit-function-declaration]
   61 |     bn_check_top(a);
      |     ^~~~~~~~~~~~
cc1: all warnings being treated as errors
ninja: build stopped: subcommand failed.

I dug through my system quickly and honestly I'm not sure what the best way forward here is.

Looks like bn_check_top is a #define in older versions of OpenSSL.  I can confirm it was in openssl 1.0.1 but no longer in 1.1.1d.

Even then it looks like it was a no-op, as in:

#define b_check_top(a)

Unless BN_DEBUG is defined before including.

So may be OK so simply drop that line completely?

Alternatively, perhaps wrap the line in #ifdef bn_check_top ...

https://docs.huihoo.com/doxygen/openssl/1.0.1c/crypto_2bn_2bn_8h_source.html#l00733

debug macro at 765, non-debug at 780 (a safe option would have been do { } while(0) ...

Either way, I'm unable to locate an implementation in openssl 1.1.1d.

Kind Regards,
Jaco

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://libwebsockets.org/pipermail/libwebsockets/attachments/20200313/2f5a0fba/attachment.htm>


More information about the Libwebsockets mailing list