summaryrefslogtreecommitdiff
path: root/shells
diff options
context:
space:
mode:
authormaya <maya@pkgsrc.org>2019-02-28 07:20:57 +0000
committermaya <maya@pkgsrc.org>2019-02-28 07:20:57 +0000
commit46855c16b78e942bce4c062bdf6739114a031127 (patch)
tree8bdc2c44907eb631b4358b828fd53fe23599ca86 /shells
parent325af1c294d41b99da490fcae903208e5c7ab8e2 (diff)
downloadpkgsrc-46855c16b78e942bce4c062bdf6739114a031127.tar.gz
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 (limited to 'shells')
-rw-r--r--shells/bash/distinfo3
-rw-r--r--shells/bash/patches/patch-examples_loadables_fdflags.c35
2 files changed, 37 insertions, 1 deletions
diff --git a/shells/bash/distinfo b/shells/bash/distinfo
index ca813e0f6ed..9f236c4e838 100644
--- a/shells/bash/distinfo
+++ b/shells/bash/distinfo
@@ -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-ag) = cd3b151e3bb045d2bb609c0a03d7d3df2c871f47
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 --git a/shells/bash/patches/patch-examples_loadables_fdflags.c b/shells/bash/patches/patch-examples_loadables_fdflags.c
new file mode 100644
index 00000000000..1ad139b0773
--- /dev/null
+++ b/shells/bash/patches/patch-examples_loadables_fdflags.c
@@ -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;