From e544cf06c5738615bef80efd5b53f9934f5ac8e0 Mon Sep 17 00:00:00 2001 From: libenyao Date: Tue, 17 Jan 2023 09:31:06 +0000 Subject: [PATCH 1/4] update BUILD.gn. Signed-off-by: libenyao --- BUILD.gn | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/BUILD.gn b/BUILD.gn index cb25ad92..4e3909f6 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -200,21 +200,19 @@ config("websockets_public_config") { ohos_static_library("websocket_static") { sources = [ "//third_party/libwebsockets/lib/core-net/adopt.c", - "//third_party/libwebsockets/lib/core-net/client/client.c", - "//third_party/libwebsockets/lib/core-net/client/connect.c", - "//third_party/libwebsockets/lib/core-net/client/connect2.c", - "//third_party/libwebsockets/lib/core-net/client/connect3.c", - "//third_party/libwebsockets/lib/core-net/client/connect4.c", - "//third_party/libwebsockets/lib/core-net/client/sort-dns.c", + "//third_party/libwebsockets/lib/core-net/client.c", "//third_party/libwebsockets/lib/core-net/close.c", + "//third_party/libwebsockets/lib/core-net/connect.c", "//third_party/libwebsockets/lib/core-net/dummy-callback.c", "//third_party/libwebsockets/lib/core-net/network.c", "//third_party/libwebsockets/lib/core-net/output.c", "//third_party/libwebsockets/lib/core-net/pollfd.c", "//third_party/libwebsockets/lib/core-net/sequencer.c", + "//third_party/libwebsockets/lib/core-net/server.c", "//third_party/libwebsockets/lib/core-net/service.c", "//third_party/libwebsockets/lib/core-net/sorted-usec-list.c", "//third_party/libwebsockets/lib/core-net/state.c", + "//third_party/libwebsockets/lib/core-net/stats.c", "//third_party/libwebsockets/lib/core-net/vhost.c", "//third_party/libwebsockets/lib/core-net/wsi-timeout.c", "//third_party/libwebsockets/lib/core-net/wsi.c", @@ -237,6 +235,7 @@ ohos_static_library("websocket_static") { "//third_party/libwebsockets/lib/roles/h2/hpack.c", "//third_party/libwebsockets/lib/roles/h2/http2.c", "//third_party/libwebsockets/lib/roles/h2/ops-h2.c", + "//third_party/libwebsockets/lib/roles/http/client/client-handshake.c", "//third_party/libwebsockets/lib/roles/http/client/client-http.c", "//third_party/libwebsockets/lib/roles/http/date.c", "//third_party/libwebsockets/lib/roles/http/header.c", -- Gitee From ca76e15d6a4a719bf23d6961230015b4d2f6a472 Mon Sep 17 00:00:00 2001 From: libenyao Date: Tue, 17 Jan 2023 09:35:07 +0000 Subject: [PATCH 2/4] update BUILD.gn. Signed-off-by: libenyao --- BUILD.gn | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/BUILD.gn b/BUILD.gn index 4e3909f6..68a83911 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -194,10 +194,10 @@ config("websockets_public_config") { } else { include_dirs += [ "//third_party/libwebsockets/lib/plat/unix" ] } - cflags = [ "-Wno-error=warnings" ] + cflags = [ "-Wno-error=#warnings" ] } -ohos_static_library("websocket_static") { +ohos_static_library("websockets_static") { sources = [ "//third_party/libwebsockets/lib/core-net/adopt.c", "//third_party/libwebsockets/lib/core-net/client.c", -- Gitee From 813b85594229e7a1f00b7f7ae1a6d5cd8d34614a Mon Sep 17 00:00:00 2001 From: libenyao Date: Tue, 17 Jan 2023 09:38:35 +0000 Subject: [PATCH 3/4] update include/lws_config.h. Signed-off-by: libenyao --- include/lws_config.h | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/include/lws_config.h b/include/lws_config.h index 0f3360ce..4b72fff8 100644 --- a/include/lws_config.h +++ b/include/lws_config.h @@ -222,7 +222,7 @@ /* #undef LWS_LIBRARY_VERSION_NUMBER */ /* #undef LWS_AVOID_SIGPIPE_IGN */ -/* #UNdef LWS_BUILD_HASH */ +/* #undef LWS_BUILD_HASH */ /* #undef LWS_BUILTIN_GETIFADDRS */ #define LWS_CLIENT_HTTP_PROXYING /* #undef LWS_FALLBACK_GETHOSTBYNAME */ @@ -246,11 +246,11 @@ #define LWS_HAVE_EXECVPE /* #if !define(WIN32) && !define(_WIN32) */ -/* #undef LWS_HAVE_LIBCAP */ -/* #undef LWS_HAVE_EVENTFD */ -/* #undef LWS_HAVE_SYS_CAPABILITY_H */ -/* #undef LWS_HAVE_MALLOC_USABLE_SIZE */ -/* #undef LWS_WITH_TLS */ +/* #define LWS_HAVE_LIBCAP */ +/* #define LWS_HAVE_EVENTFD */ +/* #define LWS_HAVE_SYS_CAPABILITY_H */ +/* #define LWS_HAVE_MALLOC_USABLE_SIZE */ +/* #define LWS_WITH_TLS */ /* #endif */ #define LWS_HAVE_HMAC_CTX_new @@ -266,7 +266,7 @@ /* #undef LWS_HAVE_MBEDTLS_NET_SOCKETS */ /* #undef LWS_HAVE_NEW_UV_VERSION_H */ #define LWS_HAVE_OPENSSL_ECDH_H -/* #undef LWS_HAVE_PIPE2 */ +/* #define LWS_HAVE_PIPE2 */ #define LWS_HAVE_PTHREAD_H #define LWS_HAVE_RSA_SET0_KEY #define LWS_HAVE_RSA_verify_pss_mgf1 @@ -332,7 +332,6 @@ #define LWS_WITH_HTTP2 #define LWS_WITH_HTTP_BASIC_AUTH /* #undef LWS_WITH_HTTP_BROTLI */ -/* #undef LWS_HTTP_HEADERS_ALL */ /* #undef LWS_WITH_HTTP_PROXY */ /* #undef LWS_WITH_HTTP_STREAM_COMPRESSION */ #define LWS_WITH_HTTP_UNCOMMON_HEADERS @@ -352,7 +351,7 @@ #define LWS_WITHOUT_EXTENSIONS #define LWS_WITH_SERVER /* #undef LWS_WITH_SPAWN */ -#define LWS_WITH_PEER_LIMITS +#undef LWS_WITH_PEER_LIMITS /* #undef LWS_WITH_PLUGINS */ /* #undef LWS_WITH_POLARSSL */ #define LWS_WITH_POLL -- Gitee From 573034b1d1d1937116208868103571530f813bc7 Mon Sep 17 00:00:00 2001 From: libenyao Date: Tue, 17 Jan 2023 09:40:02 +0000 Subject: [PATCH 4/4] update include/lws_config_private.h. Signed-off-by: libenyao --- include/lws_config_private.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/lws_config_private.h b/include/lws_config_private.h index eb29d4a3..43e63a5d 100644 --- a/include/lws_config_private.h +++ b/include/lws_config_private.h @@ -212,8 +212,8 @@ /* Define to 1 if you have the header file. */ #define LWS_HAVE_STRING_H -/* Define to 1 if you have the header file. */ -/* #define LWS_HAVE_STRING_H */ +/* Define to 1 if you have the header file. */ +/* #define LWS_HAVE_SYS_PRCTL_H */ /* Define to 1 if you have the header file. */ #define LWS_HAVE_SYS_SOCKET_H -- Gitee