pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/shells/bash bash: handle O_CLOEXEC not being defined (...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/a60ec0f8b69b
branches:  trunk
changeset: 330326:a60ec0f8b69b
user:      maya <maya%pkgsrc.org@localhost>
date:      Thu Feb 28 07:20:57 2019 +0000

description:
bash: handle O_CLOEXEC not being defined (Solaris 10)

(While this says "example", it's built during the "make install" phase)

Reported by Hiroshi Hakoyama in PR pkg/52045

diffstat:

 shells/bash/distinfo                                   |   3 +-
 shells/bash/patches/patch-examples_loadables_fdflags.c |  35 ++++++++++++++++++
 2 files changed, 37 insertions(+), 1 deletions(-)

diffs (56 lines):

diff -r a2f95e5a2af5 -r a60ec0f8b69b shells/bash/distinfo
--- a/shells/bash/distinfo      Thu Feb 28 06:55:51 2019 +0000
+++ b/shells/bash/distinfo      Thu Feb 28 07:20:57 2019 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.52 2019/01/21 09:03:44 leot Exp $
+$NetBSD: distinfo,v 1.53 2019/02/28 07:20:57 maya Exp $
 
 SHA1 (bash-5.0.tar.gz) = d116b469b9e6ea5264a74661d3a4c797da7f997b
 RMD160 (bash-5.0.tar.gz) = a081428a896d617855499376b670eca3433a27c1
@@ -9,6 +9,7 @@
 SHA1 (patch-aj) = 2e4c15afd9b50d44967ee8e1f85bdc908c0eeeb0
 SHA1 (patch-builtins_ulimit.def) = 1390069344607204eb3abbd6ddeb148ff590c55e
 SHA1 (patch-configure) = c4e1ab53a1ee85f3e6121047f0aca8ceb85e6e5d
+SHA1 (patch-examples_loadables_fdflags.c) = 92a63c8f4c94ccf9cf782e934a0806930d172654
 SHA1 (patch-examples_loadables_push.c) = 57a3c7de9ea0a75c373db678d9500954bcf40ff4
 SHA1 (patch-shell.c) = daa07914d4c318cd72463f80344f4f7c364809cd
 SHA1 (patch-support_shobj-conf) = 8750c104549ea8a4a722bd21a684a9fe13e05fe5
diff -r a2f95e5a2af5 -r a60ec0f8b69b shells/bash/patches/patch-examples_loadables_fdflags.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/shells/bash/patches/patch-examples_loadables_fdflags.c    Thu Feb 28 07:20:57 2019 +0000
@@ -0,0 +1,35 @@
+$NetBSD: patch-examples_loadables_fdflags.c,v 1.1 2019/02/28 07:20:57 maya Exp $
+
+Handle O_CLOEXEC not being defined (Solaris 10)
+
+--- examples/loadables/fdflags.c.orig  2017-02-02 16:40:42.000000000 +0000
++++ examples/loadables/fdflags.c
+@@ -113,8 +113,11 @@ getflags(int fd, int p)
+       return -1;
+     }
+ 
+-  if (c)
++  if (c) {
++#ifdef O_CLOEXEC
+     f |= O_CLOEXEC;
++#endif
++  }
+ 
+   return f & getallflags();
+ }
+@@ -198,6 +201,7 @@ setone(int fd, char *v, int verbose)
+ 
+   parseflags(v, &pos, &neg);
+ 
++#ifdef O_CLOEXEC
+   cloexec = -1;
+   if ((pos & O_CLOEXEC) && (f & O_CLOEXEC) == 0)
+     cloexec = FD_CLOEXEC;
+@@ -209,6 +213,7 @@ setone(int fd, char *v, int verbose)
+   pos &= ~O_CLOEXEC;
+   neg &= ~O_CLOEXEC;
+   f &= ~O_CLOEXEC;
++#endif
+ 
+   n = f;
+   n |= pos;



Home | Main Index | Thread Index | Old Index