From cc06227463d3e3793ea0c8718891ff9035ac4e66 Mon Sep 17 00:00:00 2001 From: quintus <31897806+quintus-lab@users.noreply.github.com> Date: Thu, 25 Feb 2021 15:45:34 +0800 Subject: [PATCH] Create 990-not-defined-errors-on-gcc10.patch (#6433) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This patch fixes the following error when we compile with GCC 10. ‘’ ‘’openwrt/staging_dir/toolchain-aarch64_generic_gcc-10.2.0_musl/lib/gcc/aarch64-openwrt-linux-musl/10.2.0/../../../../aarch64-openwrt-linux-musl/bin/ld: ss_local-http.o:openwrt/build_dir/target-aarch64_generic_musl/shadowsocksr-libev/shadowsocksr-libev-2.5.6-d63ff863800a5645aca4309d5dd5962bd1e95543/src/http.h:32: multiple definition of `http_protocol'; ss_local-local.o:openwrt/build_dir/target-aarch64_generic_musl/shadowsocksr-libev/shadowsocksr-libev-2.5.6-d63ff863800a5645aca4309d5dd5962bd1e95543/src/http.h:32: first defined here openwrt/staging_dir/toolchain-aarch64_generic_gcc-10.2.0_musl/lib/gcc/aarch64-openwrt-linux-musl/10.2.0/../../../../aarch64-openwrt-linux-musl/bin/ld: ss_local-tls.o:openwrt/build_dir/target-aarch64_generic_musl/shadowsocksr-libev/shadowsocksr-libev-2.5.6-d63ff863800a5645aca4309d5dd5962bd1e95543/src/tls.h:31: multiple definition of `tls_protocol'; ss_local-local.o:openwrt/build_dir/target-aarch64_generic_musl/shadowsocksr-libev/shadowsocksr-libev-2.5.6-d63ff863800a5645aca4309d5dd5962bd1e95543/src/tls.h:31: first defined here‘’ ‘’ --- .../990-not-defined-errors-on-gcc10.patch | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 package/lean/shadowsocksr-libev/patches/990-not-defined-errors-on-gcc10.patch diff --git a/package/lean/shadowsocksr-libev/patches/990-not-defined-errors-on-gcc10.patch b/package/lean/shadowsocksr-libev/patches/990-not-defined-errors-on-gcc10.patch new file mode 100644 index 000000000..7a480f12b --- /dev/null +++ b/package/lean/shadowsocksr-libev/patches/990-not-defined-errors-on-gcc10.patch @@ -0,0 +1,24 @@ +diff --git a/src/http.h b/src/http.h +index 914815a..e312dd3 100644 +--- a/src/http.h ++++ b/src/http.h +@@ -29,6 +29,6 @@ + #include + #include "protocol.h" + +-const protocol_t *const http_protocol; ++extern const protocol_t *const http_protocol; + + #endif +diff --git a/src/tls.h b/src/tls.h +index 3998913..ddbee11 100644 +--- a/src/tls.h ++++ b/src/tls.h +@@ -28,6 +28,6 @@ + + #include "protocol.h" + +-const protocol_t *const tls_protocol; ++extern const protocol_t *const tls_protocol; + + #endif