mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-09 00:00:04 +01:00
cmake: Fix bzero mis-detection on MinGW
Using a C compiler ignores non-existent functions, and tries to link them anyway. The compiler optimizes `bzero(buf, 1)` to `movb $0x0,0xf(%esp)`, so bzero is not called at all, and the linker succeeds. Increase the buffer size to 100 to avoid this optimization.
This commit is contained in:
parent
fd1f4e4de7
commit
1d6128d1fe
1 changed files with 1 additions and 1 deletions
|
@ -723,7 +723,7 @@ endif()
|
|||
|
||||
CHECK_C_SOURCE_COMPILES(
|
||||
"#include <strings.h>
|
||||
int main(int argc, char **argv) { char buf[1]; bzero(buf, 1); return 0; }
|
||||
int main(int argc, char **argv) { char buf[100]; bzero(buf, 100); return 0; }
|
||||
" LWS_HAVE_BZERO)
|
||||
CHECK_C_SOURCE_COMPILES(
|
||||
"#include <malloc.h>
|
||||
|
|
Loading…
Add table
Reference in a new issue