Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 24 Nov 2021 06:06:15 GMT
From:      Xin LI <delphij@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-branches@FreeBSD.org
Subject:   git: 18a47d7c81c8 - 2021Q4 - net/shadowsocks-libev: fix build error on 14.0-CURRENT
Message-ID:  <202111240606.1AO66Fmj084231@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch 2021Q4 has been updated by delphij:

URL: https://cgit.FreeBSD.org/ports/commit/?id=18a47d7c81c82c753c8f43fe1ab0c2384f0c63d7

commit 18a47d7c81c82c753c8f43fe1ab0c2384f0c63d7
Author:     Xiaoding Liu <xiaoding+freebsd@xiaoding.org>
AuthorDate: 2021-11-24 06:01:47 +0000
Commit:     Xin LI <delphij@FreeBSD.org>
CommitDate: 2021-11-24 06:06:04 +0000

    net/shadowsocks-libev: fix build error on 14.0-CURRENT
    
    PR:             ports/259951
    (cherry picked from commit 0d391b9c88a96b439c58aa222d3437a93231db14)
---
 .../files/patch-libcork_src_libcork_posix_env.c    | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/net/shadowsocks-libev/files/patch-libcork_src_libcork_posix_env.c b/net/shadowsocks-libev/files/patch-libcork_src_libcork_posix_env.c
new file mode 100644
index 000000000000..0147df86dc1a
--- /dev/null
+++ b/net/shadowsocks-libev/files/patch-libcork_src_libcork_posix_env.c
@@ -0,0 +1,22 @@
+--- libcork/src/libcork/posix/env.c.orig	2019-07-24 14:01:14 UTC
++++ libcork/src/libcork/posix/env.c
+@@ -194,12 +194,19 @@ cork_env_set_vars(void *user_data, struct cork_hash_ta
+  *
+  * [1] http://www.gnu.org/software/gnulib/manual/html_node/clearenv.html
+  */
++
++#if (defined(__FreeBSD__) && (__FreeBSD__ < 14))
++/* Since FreeBSD 14.0-CURRENT, the clearenv(3) function was added to stdlib.
++ * See https://reviews.freebsd.org/R10:597b02675751e48dd04777f1e91fee382bf3a966
++ */
++
+ static void
+ clearenv(void)
+ {
+     *environ = NULL;
+ }
+ 
++#endif
+ #else
+ /* Otherwise assume that we have clearenv available. */
+ #endif



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202111240606.1AO66Fmj084231>