1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-09 00:00:04 +01:00

Subject: [PATCH] Fix bzero misdetection also for GCC >=8

The fix in 1d6128d1fe worked for
MinGW with GCC7, but GCC8 evidentially got smarter, and it
also substitutes bzero->memset for larger arrays.

Set the emitted warning as an error to avoid misdetection.
This commit is contained in:
Orgad Shaneh 2019-05-16 10:28:20 +03:00 committed by Andy Green
parent 8a0ab2de48
commit 8f5cdac36d

View file

@ -719,6 +719,9 @@ endif()
CHECK_C_SOURCE_COMPILES(
"#include <strings.h>
#if __GNUC__
#pragma GCC diagnostic error \"-Wimplicit-function-declaration\"
#endif
int main(int argc, char **argv) { char buf[100]; bzero(buf, 100); return 0; }
" LWS_HAVE_BZERO)
CHECK_C_SOURCE_COMPILES(