commit:     f7ae36c9547d429f58be24e0416848cd25e8d8bb
Author:     Benda Xu <heroxbd <AT> gentoo <DOT> org>
AuthorDate: Tue Nov 24 05:50:11 2020 +0000
Commit:     Benda XU <heroxbd <AT> gentoo <DOT> org>
CommitDate: Tue Nov 24 05:51:48 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f7ae36c9

profiles/f/p/s/kernel-2.6.16+/p.bashrc: libuv compatibility.

libuv is a dependency of cmake.

Switch off CLOEXEC related functions that are not introduced until
linux-2.6.27.

Signed-off-by: Benda Xu <heroxbd <AT> gentoo.org>

 profiles/features/prefix/standalone/kernel-2.6.16+/profile.bashrc | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/profiles/features/prefix/standalone/kernel-2.6.16+/profile.bashrc 
b/profiles/features/prefix/standalone/kernel-2.6.16+/profile.bashrc
index ed5226a858d..6370f687cad 100644
--- a/profiles/features/prefix/standalone/kernel-2.6.16+/profile.bashrc
+++ b/profiles/features/prefix/standalone/kernel-2.6.16+/profile.bashrc
@@ -3,6 +3,10 @@
 if [[ ${CATEGORY}/${PN} == dev-util/cmake && ${EBUILD_PHASE} == configure ]]; 
then
     einfo "Removing utimensat outputs..."
     sed -e '/UTIMENSAT=/d' -i "${S}"/Source/kwsys/CMakeLists.txt || die
+elif [[ ${CATEGORY}/${PN} == dev-libs/libuv && ${EBUILD_PHASE} == prepare ]]; 
then
+    einfo "Removing CLOEXEC related functions..."
+    sed -e 's/defined(__FreeBSD__) || defined(__linux__)/0/' \
+        -i "${S}"/src/unix/process.c || die
 elif [[ ${CATEGORY}/${PN} == dev-qt/qtcore && ${EBUILD_PHASE} == configure ]]; 
then
     einfo "Removing pipe2 definitions..."
     sed -e '/define.*HAVE_PIPE2/d' -i "${S}"/src/3rdparty/forkfd/forkfd.c || 
die
@@ -19,7 +23,7 @@ elif [[ ${CATEGORY}/${PN} == sys-apps/util-linux && 
${EBUILD_PHASE} == configure
     sed -r -e 's/inotify_init1\(.*\)/inotify_init\(\)/' \
        -e '/open\(/s/\| *O_CLOEXEC//' \
        -e 's/epoll_create1\(EPOLL_CLOEXEC/epoll_create\(1/' \
-       -i "${S}"/libmount/src/monitor.c
+       -i "${S}"/libmount/src/monitor.c || die
 fi
 
 # Local Variables:

Reply via email to