Skip to contentSkip to conversation

package/libwebsockets: bump to v3.1.0

PATCH New qwendu 2 participants 4 messages Jan 2, 2019 – Feb 6, 2019

lore
Share & tools
lore

qwendu

author
#0 lore raw

PATCH 1/1 package/libwebsockets: bump to v3.1.0

added -fno-strict-aliasing to fixed the following error:
...
libwebsockets-v3.1.0/lib/event-libs/libev/libev.c:34:3: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]

    ev_timer_set(&pt->ev.hrtimer, ((float)us) / 1000000.0, 0);
---
 package/libwebsockets/cmake-no-strict-aliasin.patch | 16 ++++++++++++++++
 package/libwebsockets/libwebsockets.hash            |  2 +-
 package/libwebsockets/libwebsockets.mk              |  2 +-
 3 files changed, 18 insertions(+), 2 deletions(-)
 create mode 100644 package/libwebsockets/cmake-no-strict-aliasin.patch
package/libwebsockets/cmake-no-strict-aliasin.patch new file +16 -0
new file mode 100644
index 0000000..8515d40
@@ -0,0 +1,16 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 453fdfd..6fd1712 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -1233,9 +1233,9 @@ if (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX OR (CMAKE_C_COMPILER_ID
+     endif()
+ 
+     if (UNIX AND NOT LWS_WITH_ESP32)
+-	    set(CMAKE_C_FLAGS "-Wall -Wsign-compare -Wignored-qualifiers -Wtype-limits -Wuninitialized -Werror ${VISIBILITY_FLAG} -Wundef ${GCOV_FLAGS} ${CMAKE_C_FLAGS} ${ASAN_FLAGS}" )
++	    set(CMAKE_C_FLAGS "-fno-strict-aliasing -Wall -Wsign-compare -Wignored-qualifiers -Wtype-limits -Wuninitialized -Werror ${VISIBILITY_FLAG} -Wundef ${GCOV_FLAGS} ${CMAKE_C_FLAGS} ${ASAN_FLAGS}" )
+     else()
+-	    set(CMAKE_C_FLAGS "-Wall -Wsign-compare -Wignored-qualifiers -Wtype-limits -Wuninitialized -Werror ${VISIBILITY_FLAG} ${GCOV_FLAGS} ${CMAKE_C_FLAGS}" )
++	    set(CMAKE_C_FLAGS "-fno-strict-aliasing -Wall -Wsign-compare -Wignored-qualifiers -Wtype-limits -Wuninitialized -Werror ${VISIBILITY_FLAG} ${GCOV_FLAGS} ${CMAKE_C_FLAGS}" )
+     endif()
+ endif ()
+ 
package/libwebsockets/libwebsockets.hash +1 -1
index ea7c8ca..2cd94dac 100644
@@ -1,3 +1,3 @@
 # Locally computed:
-sha256	73012d7fcf428dedccc816e83a63a01462e27819d5537b8e0d0c7264bfacfad6    libwebsockets-v2.4.2.tar.gz
+sha256  db948be74c78fc13f1f1a55e76707d7baae3a1c8f62b625f639e8f2736298324    libwebsockets-v3.1.0.tar.gz
 sha256  078fbbbeab357fc6d4f8090e95e9022fa4cb9eac1efd77b2f1387e9ccc51917a    LICENSE
package/libwebsockets/libwebsockets.mk +1 -1
index 81e398b..238410f 100644
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-LIBWEBSOCKETS_VERSION = v2.4.2
+LIBWEBSOCKETS_VERSION = v3.1.0
 LIBWEBSOCKETS_SITE = $(call github,warmcat,libwebsockets,$(LIBWEBSOCKETS_VERSION))
 LIBWEBSOCKETS_LICENSE = LGPL-2.1 with exceptions
 LIBWEBSOCKETS_LICENSE_FILES = LICENSE
Signature · 1 line
2.7.4
author
#1 lore raw

PATCH 1/1 package/libwebsockets: bump to v3.1.0

this patch fixed the following error:
...
output/build/libwebsockets-v3.1.0/lib/event-libs/libuv/libuv.c: In function 'elops_destroy_context1_uv':
output/build/libwebsockets-v3.1.0/lib/event-libs/libuv/libuv.c:519:7: error: 'm' may be used uninitialized in this function [-Werror=maybe-uninitialized]

    if (m)
       ^
---
 package/libwebsockets/libuv-uninitialized.patch | 13 +++++++++++++
 1 file changed, 13 insertions(+)
 create mode 100644 package/libwebsockets/libuv-uninitialized.patch
package/libwebsockets/libuv-uninitialized.patch new file +13 -0
new file mode 100644
index 0000000..319afee
@@ -0,0 +1,13 @@
+diff --git a/lib/event-libs/libuv/libuv.c b/lib/event-libs/libuv/libuv.c
+index 39363f1..746d6ba 100644
+--- a/lib/event-libs/libuv/libuv.c
++++ b/lib/event-libs/libuv/libuv.c
+@@ -503,7 +503,7 @@ static int
+ elops_destroy_context1_uv(struct lws_context *context)
+ {
+ 	struct lws_context_per_thread *pt;
+-	int n, m;
++	int n, m=0;
+ 
+ 	for (n = 0; n < context->count_threads; n++) {
+ 		int budget = 10000;
Signature · 1 line
2.7.4
#2 lore raw

PATCH 1/1 package/libwebsockets: bump to v3.1.0

Hello,

Quoted 4 lines · On Wed, 2 Jan 2019 17:32:51 +0800 qwendu <[email protected]> wrote:

this patch fixed the following error:
...
output/build/libwebsockets-v3.1.0/lib/event-libs/libuv/libuv.c: In function 'elops_destroy_context1_uv':
output/build/libwebsockets-v3.1.0/lib/event-libs/libuv/libuv.c:519:7: error: 'm' may be used uninitialized in this function [-Werror=maybe-uninitialized]

Quoted 8 lines
    if (m)
       ^
---
 package/libwebsockets/libuv-uninitialized.patch | 13 +++++++++++++
 1 file changed, 13 insertions(+)
 create mode 100644 package/libwebsockets/libuv-uninitialized.patch

This should be part of the commit bumping libwebsockets.

Also, the patch should have a description and a Signed-off-by line, and be generated with "git format-patch -N".

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#3 lore raw

PATCH 1/1 package/libwebsockets: bump to v3.1.0

In reply to qwendu

Hello,

Thanks for your contribution!

Quoted 19 lines · On Wed, 2 Jan 2019 17:32:50 +0800 qwendu <[email protected]> wrote:

added -fno-strict-aliasing to fixed the following error:
...
libwebsockets-v3.1.0/lib/event-libs/libev/libev.c:34:3: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]

    ev_timer_set(&pt->ev.hrtimer, ((float)us) / 1000000.0, 0);
---
 package/libwebsockets/cmake-no-strict-aliasin.patch | 16 ++++++++++++++++
 package/libwebsockets/libwebsockets.hash            |  2 +-
 package/libwebsockets/libwebsockets.mk              |  2 +-
 3 files changed, 18 insertions(+), 2 deletions(-)
 create mode 100644 package/libwebsockets/cmake-no-strict-aliasin.patch
package/libwebsockets/cmake-no-strict-aliasin.patch new file +0 -0
new file mode 100644
index 0000000..8515d40

package/libwebsockets/cmake-no-strict-aliasin.patch line 4

Quoted 4 lines
package/libwebsockets/cmake-no-strict-aliasin.patch new file +4 -0
@@ -0,0 +1,16 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 453fdfd..6fd1712 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt

Patches must have a description and a Signed-off-by, and should be generated with "git format-patch -N". Also, it seems like another patch was necessary, but you sent it separately, it should be part of the same commit.

Thanks,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com