1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-16 00:00:07 +01:00
libwebsockets/lib
Fabrice Fontaine a5f81f8336 lib/tls/CMakeLists.txt: fix build without threads
openssl can be built without threads resulting in the following build
failure:

-- Looking for HMAC_CTX_new
-- Looking for HMAC_CTX_new - not found

[...]

In file included from /home/buildroot/autobuild/instance-0/output-1/build/libwebsockets-4.3.1/include/libwebsockets.h:661,
                 from /home/buildroot/autobuild/instance-0/output-1/build/libwebsockets-4.3.1/lib/core/./private-lib-core.h:140,
                 from /home/buildroot/autobuild/instance-0/output-1/build/libwebsockets-4.3.1/lib/plat/unix/unix-misc.c:28:
/home/buildroot/autobuild/instance-0/output-1/build/libwebsockets-4.3.1/include/libwebsockets/lws-genhash.h:85:18: error: field 'ctx' has incomplete type
   85 |         HMAC_CTX ctx;
      |                  ^~~

To fix this build failure, don't unconditionally add pthread if openssl
has been found through pkg-config as openssl.pc will contain the
appropriate dependencies (i.e. -lpthread but also -lz or -latomic)

Fixes:
 - http://autobuild.buildroot.org/results/2ae9e3249b6fcc9e6c30e7783e264fc6599e61df

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
2022-06-14 07:50:24 +01:00
..
abstract license: fix two old headers from pre-MIT change 2021-05-04 18:33:36 +01:00
core threadpool: improve relationship with LWS_HAVE_PTHREAD_H 2022-05-17 15:37:16 +01:00
core-net windows: client connect: use sockaddr size 2022-06-14 07:42:25 +01:00
cose coverity: 2021-12-1 uplevel fixes 2022-05-17 15:34:22 +01:00
drivers esp32: update against Dec 21 idf 2022-01-04 15:59:50 +00:00
event-libs uv: handle uv_poll_init failure 2021-10-07 11:22:36 +01:00
jose cose: keys and signing + validation 2021-08-31 05:45:35 +01:00
misc lejp-conf: provide matches for block start paths 2022-02-11 08:43:16 +00:00
plat eventloop: windows: ssl: remove spin 2022-06-14 07:34:43 +01:00
roles http: server: correct plugin name in error 2022-06-14 07:34:34 +01:00
secure-streams coverity: ss: mqtt: remove needless wsi check 2022-05-17 15:53:53 +01:00
system coverity: reorder NULL check 2022-05-17 15:53:53 +01:00
tls lib/tls/CMakeLists.txt: fix build without threads 2022-06-14 07:50:24 +01:00
CMakeLists.txt pkgconfig: use appropriate static lib name 2022-02-21 11:10:05 +00:00
README.md cleaning 2020-01-05 22:17:58 +00:00

Library sources layout

Code that goes in the libwebsockets library itself lives down ./lib

Path Sources
lib/core Core lws code related to generic fd and wsi servicing and management
lib/core-net Core lws code that applies only if networking enabled
lib/event-libs Code containing optional event-lib specific adaptations
lib/jose JOSE / JWS / JWK / JWE implementations
lib/misc Code for various mostly optional miscellaneous features
lib/plat Platform-specific adaptation code
lib/roles Code for specific optional wsi roles, eg, http/1, h2, ws, raw, etc
lib/system Code for system-level features, eg, dhcpclient
lib/tls Code supporting the various TLS libraries