[core] workaround fragile code in wolfssl types.h

workaround fragile code in wolfssl/wolfcrypto/types.h

Including header blows up compile in 32-bit when lighttpd meson build
in OpenWRT on a 32-bit platform generates lighttpd config.h containing
define of SIZEOF_LONG, but not SIZEOF_LONG_LONG, and the wolfssl types.h
flubs and fails to choose an enum value used by a macro that is unused
by most consumers of the wolfssl header.
personal/stbuehler/tests-path lighttpd-1.4.56-rc4
Glenn Strauss 2020-10-29 05:06:24 -04:00
parent 31fc3a0773
commit e9590277ca
1 changed files with 17 additions and 0 deletions

View File

@ -17,6 +17,23 @@
* compatibility layer for wolfSSL to be able to provide an openssl substitute
* for use by lighttpd */
#include <wolfssl/options.h>
/* workaround fragile code in wolfssl/wolfcrypto/types.h */
#ifdef __SIZEOF_LONG__
#ifndef SIZEOF_LONG
#define SIZEOF_LONG __SIZEOF_LONG__
#endif
#endif
#ifdef __SIZEOF_LONG_LONG__
#ifndef SIZEOF_LONG_LONG
#define SIZEOF_LONG_LONG __SIZEOF_LONG_LONG__
#endif
#endif
#if !defined(SIZEOF_LONG) && !defined(SIZEOF_LONG_LONG)
#undef SIZEOF_LONG
#undef SIZEOF_LONG_LONG
#endif
#endif
#endif