From 03b0c42c88eea7b6911fff76cfc5882b0b7f778f Mon Sep 17 00:00:00 2001 From: LEAN-ESX Date: Wed, 16 Oct 2019 09:32:43 -0700 Subject: [PATCH] shadowsocksr-libev: workaround for Werror-sizeof-pointer-memaccess in GCC 4.9+ --- package/lean/shadowsocksr-libev/Makefile | 2 +- .../999-Fix-Werror-sizeof-pointer-memaccess.patch | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 package/lean/shadowsocksr-libev/patches/999-Fix-Werror-sizeof-pointer-memaccess.patch diff --git a/package/lean/shadowsocksr-libev/Makefile b/package/lean/shadowsocksr-libev/Makefile index a3644d5b4..759b0f0d7 100644 --- a/package/lean/shadowsocksr-libev/Makefile +++ b/package/lean/shadowsocksr-libev/Makefile @@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=shadowsocksr-libev PKG_VERSION:=2.5.6 -PKG_RELEASE:=3 +PKG_RELEASE:=5 PKG_SOURCE_PROTO:=git PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz diff --git a/package/lean/shadowsocksr-libev/patches/999-Fix-Werror-sizeof-pointer-memaccess.patch b/package/lean/shadowsocksr-libev/patches/999-Fix-Werror-sizeof-pointer-memaccess.patch new file mode 100644 index 000000000..9da0c52b9 --- /dev/null +++ b/package/lean/shadowsocksr-libev/patches/999-Fix-Werror-sizeof-pointer-memaccess.patch @@ -0,0 +1,11 @@ +--- a/src/local.c ++++ b/src/local.c +@@ -718,7 +718,7 @@ + + ss_free(hostname); + } else { +- strncpy(host, ip, sizeof(ip)); ++ strncpy(host, ip, INET6_ADDRSTRLEN); + } + } +