From 0856c80b797a219372f8a4aeb13843ac69617230 Mon Sep 17 00:00:00 2001 From: fengtao Date: Tue, 21 Jan 2020 12:03:32 +0800 Subject: [PATCH] add bind now secure compile option --- 0001-add-secure-compile-option-in-Makefile.patch | 14 ++++++++++++++ libwebsockets.spec | 9 ++++++++- 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 0001-add-secure-compile-option-in-Makefile.patch diff --git a/0001-add-secure-compile-option-in-Makefile.patch b/0001-add-secure-compile-option-in-Makefile.patch new file mode 100644 index 0000000..4607a06 --- /dev/null +++ b/0001-add-secure-compile-option-in-Makefile.patch @@ -0,0 +1,14 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index c62d7f9..b046e90 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -38,6 +38,8 @@ set(LWS_LIBRARY_VERSION_PATCH ${CPACK_PACKAGE_VERSION_PATCH}) + + set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PROJECT_SOURCE_DIR}/cmake/") + ++set(CMAKE_C_FLAGS "-Wl,-z,now ${CMAKE_C_FLAGS}") ++ + message(STATUS "CMAKE_TOOLCHAIN_FILE='${CMAKE_TOOLCHAIN_FILE}'") + + # Try to find the current Git hash. + diff --git a/libwebsockets.spec b/libwebsockets.spec index fee4a2d..db69c84 100644 --- a/libwebsockets.spec +++ b/libwebsockets.spec @@ -1,11 +1,12 @@ Name: libwebsockets Version: 2.4.2 -Release: 2 +Release: 3 Summary: A lightweight C library for Websockets License: LGPLv2 and Public Domain and BSD and MIT and zlib URL: https://libwebsockets.org Source0: https://github.com/warmcat/libwebsockets/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz Patch6000: libwebsockets-fix-coredump.patch +Patch9000: 0001-add-secure-compile-option-in-Makefile.patch BuildRequires: cmake openssl-devel zlib-devel libev-devel git @@ -73,5 +74,11 @@ find %{buildroot} -name '*_static.pc' -exec rm -f {} ';' %doc changelog README.md READMEs/ %changelog +* Tue Jan 21 2020 openEuler Buildteam - 2.4.2-3 +- Type:bugfix +- ID:NA +- SUG:reboot +- DESC:add bind now secure compile option + * Mon Sep 16 2019 openEuler Buildteam - 2.4.2-2 - Package init