{"schema":"libjg2-1",
"vpath":"/git/",
"avatar":"/git/avatar/",
"alang":"",
"gen_ut":1752665505,
"reponame":"libwebsockets",
"desc":"libwebsockets lightweight C networking library",
"owner": { "name": "Andy Green", "email": "andy@warmcat.com", "md5": "c50933ca2aa61e0fe2c43d46bb6b59cb" },"url":"https://libwebsockets.org/repo/libwebsockets",
"f":3,
"items": [
{"schema":"libjg2-1",
"cid":"d6fc2ca00634c8803f2663cb79d78c45",
"commit": {"type":"commit",
"time": 1578262678,
"time_ofs": 0,
"oid_tree": { "oid": "5a1f918045b32fe912d105e12d55bdf94409c4be", "alias": []},
"oid":{ "oid": "6e35da95e5e55af21e82172ddfe92f524e0c62e9", "alias": []},
"msg": "openssl: detect apis correctly when pthreads not available",
"sig_commit": { "git_time": { "time": 1578262678, "offset": 0 }, "name": "Andy Green", "email": "andy@warmcat.com", "md5": "c50933ca2aa61e0fe2c43d46bb6b59cb" },
"sig_author": { "git_time": { "time": 1578060126, "offset": 0 }, "name": "Fabrice Fontaine", "email": "fontaine.fabrice@gmail.com", "md5": "5e70e9fa9dce77d9546bd107c4ceded0" }},
"body": "openssl: detect apis correctly when pthreads not available\n\nSince version 3.1.0 and commit aa4143aebdb59f4f21094781fb3b6ab4649643a6,\n-pthread is unconditionally added to CMAKE_REQUIRED_FLAGS even if\npthread.h is not found, this will result in a build failure with openssl\nif the toolchain doesn't support threads:\n\n[ 5%] Building C object CMakeFiles/websockets_shared.dir/lib/core/lws_dll2.c.o\nIn file included from /home/buildroot/autobuild/instance-2/output-1/build/libwebsockets-3.2.0/include/libwebsockets.h:570,\n from /home/buildroot/autobuild/instance-2/output-1/build/libwebsockets-3.2.0/lib/core/private.h:130,\n from /home/buildroot/autobuild/instance-2/output-1/build/libwebsockets-3.2.0/lib/core/lws_dll2.c:22:\n/home/buildroot/autobuild/instance-2/output-1/build/libwebsockets-3.2.0/include/libwebsockets/lws-genhash.h:79:18: error: field 'ctx' has incomplete type\n HMAC_CTX ctx;\n ^~~\n\nThis build failure is raised because openssl functions are not correcly\ndetected:\n\nDetermining if the function SSL_CTX_set1_param exists failed with the following output:\nChange Dir: /home/buildroot/autobuild/instance-2/output-1/build/libwebsockets-3.2.0/CMakeFiles/CMakeTmp\n\nRun Build Command(s):/usr/bin/make cmTC_06946/fast \u0026\u0026 make[1]: Entering directory '/home/buildroot/autobuild/instance-2/output-1/build/libwebsockets-3.2.0/CMakeFiles/CMakeTmp'\n/usr/bin/make -f CMakeFiles/cmTC_06946.dir/build.make CMakeFiles/cmTC_06946.dir/build\nmake[2]: Entering directory '/home/buildroot/autobuild/instance-2/output-1/build/libwebsockets-3.2.0/CMakeFiles/CMakeTmp'\nBuilding C object CMakeFiles/cmTC_06946.dir/CheckFunctionExists.c.o\n/home/buildroot/autobuild/instance-2/output-1/host/bin/arm-linux-gcc --sysroot\u003d/home/buildroot/autobuild/instance-2/output-1/host/arm-buildroot-linux-uclibcgnueabihf/sysroot -DKEYWORD\u003d__inline -Wall -Wsign-compare -Wuninitialized -Werror -Wundef -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS\u003d64 -Os -DCHECK_FUNCTION_EXISTS\u003dSSL_CTX_set1_param -pthread -DNDEBUG -o CMakeFiles/cmTC_06946.dir/CheckFunctionExists.c.o -c /home/buildroot/autobuild/instance-2/output-1/host/share/cmake-3.15/Modules/CheckFunctionExists.c\nLinking C executable cmTC_06946\n/home/buildroot/autobuild/instance-2/output-1/host/bin/cmake -E cmake_link_script CMakeFiles/cmTC_06946.dir/link.txt --verbose\u003d1\n/home/buildroot/autobuild/instance-2/output-1/host/bin/arm-linux-gcc --sysroot\u003d/home/buildroot/autobuild/instance-2/output-1/host/arm-buildroot-linux-uclibcgnueabihf/sysroot -Wall -Wsign-compare -Wuninitialized -Werror -Wundef -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS\u003d64 -Os -DCHECK_FUNCTION_EXISTS\u003dSSL_CTX_set1_param -pthread -DNDEBUG CMakeFiles/cmTC_06946.dir/CheckFunctionExists.c.o -o cmTC_06946 /home/buildroot/autobuild/instance-2/output-1/host/arm-buildroot-linux-uclibcgnueabihf/sysroot/usr/lib/libssl.so /home/buildroot/autobuild/instance-2/output-1/host/arm-buildroot-linux-uclibcgnueabihf/sysroot/usr/lib/libcrypto.so -lssl -lcrypto -lm -lcap\n/home/buildroot/autobuild/instance-2/output-1/host/opt/ext-toolchain/bin/../lib/gcc/arm-buildroot-linux-uclibcgnueabihf/8.3.0/../../../../arm-buildroot-linux-uclibcgnueabihf/bin/ld: cannot find -lpthread\ncollect2: error: ld returned 1 exit status\nCMakeFiles/cmTC_06946.dir/build.make:88: recipe for target 'cmTC_06946' failed\n\nFixes:\n - http://autobuild.buildroot.org/results/6186b4718db285edadf7203d00ed72f8d76a31e4\n\nSigned-off-by: Fabrice Fontaine \u003cfontaine.fabrice@gmail.com\u003e"
,
"diff": "diff --git a/CMakeLists.txt b/CMakeLists.txt\nindex 888f65e..737011b 100644\n--- a/CMakeLists.txt\n+++ b/CMakeLists.txt\n@@ -929,18 +929,20 @@ CHECK_C_SOURCE_COMPILES(\u0022#include \u003cstdint.h\u003e\n \t\treturn 0;\n \t}\u0022 LWS_HAS_INTPTR_T)\n \n-set(CMAKE_REQUIRED_FLAGS \u0022-pthread\u0022)\t\n-CHECK_C_SOURCE_COMPILES(\u0022#define _GNU_SOURCE \n-\t#include \u003cpthread.h\u003e \n-\tint main(void) { \n-\t\tpthread_t th \u003d 0;\n-\t\tpthread_setname_np(th, NULL);\n-\t\treturn 0;\n-\t}\u0022 LWS_HAS_PTHREAD_SETNAME_NP)\n+if (LWS_HAVE_PTHREAD_H)\n+\tset(CMAKE_REQUIRED_FLAGS \u0022-pthread\u0022)\n+\tCHECK_C_SOURCE_COMPILES(\u0022#define _GNU_SOURCE\n+\t\t#include \u003cpthread.h\u003e\n+\t\tint main(void) {\n+\t\t\tpthread_t th \u003d 0;\n+\t\t\tpthread_setname_np(th, NULL);\n+\t\t\treturn 0;\n+\t\t}\u0022 LWS_HAS_PTHREAD_SETNAME_NP)\n+endif()\n \n CHECK_C_SOURCE_COMPILES(\u0022#include \u003cstddef.h\u003e\n-\t#include \u003cgetopt.h\u003e \n-\tint main(void) { \n+\t#include \u003cgetopt.h\u003e\n+\tint main(void) {\n \t\tvoid *p \u003d (void *)getopt_long;\n \t\treturn p !\u003d NULL;\n \t}\u0022 LWS_HAS_GETOPT_LONG)\n","s":{"c":1752665505,"u": 3282}}
],"g": 4390,"chitpc": 0,"ehitpc": 0,"indexed":0
,
"ab": 0, "si": 0, "db":0, "di":0, "sat":0, "lfc": "0000"}