summaryrefslogtreecommitdiff
path: root/lang
diff options
context:
space:
mode:
authorhe <he@pkgsrc.org>2016-10-04 07:21:30 +0000
committerhe <he@pkgsrc.org>2016-10-04 07:21:30 +0000
commitd97d40c176c8e78f3e4aaa372acde2e160511500 (patch)
treedd17bd41793187080e7f0d4be623be9a4f1b734c /lang
parent3674ccce717a5428fd0b047c6c398349acb87d49 (diff)
downloadpkgsrc-d97d40c176c8e78f3e4aaa372acde2e160511500.tar.gz
Don't invade the implementation namespace.
There's no guarantee that __errno is free for own use. (On NetBSD it isn't!)
Diffstat (limited to 'lang')
-rw-r--r--lang/erlang/distinfo3
-rw-r--r--lang/erlang/patches/patch-erts_emulator_sys_unix_sys.c24
2 files changed, 26 insertions, 1 deletions
diff --git a/lang/erlang/distinfo b/lang/erlang/distinfo
index 6ae39ee9af8..d12bfca9b86 100644
--- a/lang/erlang/distinfo
+++ b/lang/erlang/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.46 2016/10/02 10:12:36 fhajny Exp $
+$NetBSD: distinfo,v 1.47 2016/10/04 07:21:30 he Exp $
SHA1 (erlang/otp_src_19.1.tar.gz) = 9f83a442de96c075a7cd1c42ceae9e3ce44b8f76
RMD160 (erlang/otp_src_19.1.tar.gz) = 7a850068e9b46f8b6f54f83e95d2d5d09ec674e7
@@ -10,4 +10,5 @@ SHA1 (patch-ao) = e5801f2a1f1f7e8b75dc35abbc485dc310666a37
SHA1 (patch-ay) = f5f1accdb11e404ba4779b056228431e3080e4cd
SHA1 (patch-erts_configure) = dba8d72974e8c493cf2bb90e6b149a84dd9073da
SHA1 (patch-erts_emulator_drivers_common_inet__drv.c) = b7784e5e8e025ca75d5279a63e0cb3f74c54bd6a
+SHA1 (patch-erts_emulator_sys_unix_sys.c) = 976124f49103f994db0cd7334987f42fc5c590bc
SHA1 (patch-make_output.mk.in) = d7b3da58bfb471d52c41242e2a03d1598ce24e62
diff --git a/lang/erlang/patches/patch-erts_emulator_sys_unix_sys.c b/lang/erlang/patches/patch-erts_emulator_sys_unix_sys.c
new file mode 100644
index 00000000000..26628a1845d
--- /dev/null
+++ b/lang/erlang/patches/patch-erts_emulator_sys_unix_sys.c
@@ -0,0 +1,24 @@
+$NetBSD: patch-erts_emulator_sys_unix_sys.c,v 1.1 2016/10/04 07:21:30 he Exp $
+
+Don't invade the implementation namespace.
+There's no guarantee that __errno is free for own use
+(on NetBSD it isn't!)
+
+--- erts/emulator/sys/unix/sys.c.orig 2016-09-20 19:11:23.000000000 +0000
++++ erts/emulator/sys/unix/sys.c
+@@ -715,13 +715,13 @@ static RETSIGTYPE suspend_signal(void)
+ static RETSIGTYPE suspend_signal(int signum)
+ #endif
+ {
+- int res, buf[1], __errno = errno;
++ int res, buf[1], save_errno = errno;
+ do {
+ res = read(sig_suspend_fds[0], buf, sizeof(int));
+ } while (res < 0 && errno == EINTR);
+
+ /* restore previous errno in case read changed it */
+- errno = __errno;
++ errno = save_errno;
+ }
+ #endif /* #ifdef ERTS_SYS_SUSPEND_SIGNAL */
+