diff options
author | Glenn Strauss <gstrauss@gluelogic.com> | 2020-10-29 05:06:24 -0400 |
---|---|---|
committer | Glenn Strauss <gstrauss@gluelogic.com> | 2020-10-29 05:06:24 -0400 |
commit | e9590277ca85f58129b1c349bfc5e3edcd931438 (patch) | |
tree | c27f2bc40f606f69631acffceef6494d03b28c5f | |
parent | 31fc3a077328ff8d81c40e89c68c13cbe069e546 (diff) | |
download | lighttpd-git-e9590277ca85f58129b1c349bfc5e3edcd931438.tar.gz |
[core] workaround fragile code in wolfssl types.hlighttpd-1.4.56-rc4
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.
-rw-r--r-- | src/sys-crypto.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/sys-crypto.h b/src/sys-crypto.h index aad3d0f3..71663681 100644 --- a/src/sys-crypto.h +++ b/src/sys-crypto.h @@ -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 |