erlang: Fix build with SunOS/C99.

This commit is contained in:
jperkin 2018-01-29 16:54:38 +00:00
parent 3577da00ae
commit a0e8de0055
3 changed files with 37 additions and 1 deletions

View file

@ -1,4 +1,4 @@
$NetBSD: distinfo,v 1.55 2017/12/13 14:45:20 fhajny Exp $
$NetBSD: distinfo,v 1.56 2018/01/29 16:54:38 jperkin Exp $
SHA1 (erlang/otp_src_20.2.tar.gz) = afcd19e56cb41907b1b53de2fe25dab7be34d66a
RMD160 (erlang/otp_src_20.2.tar.gz) = f2d34e6d40214cc470ad7c0190d2c1bda18ccde1
@ -9,5 +9,7 @@ SHA1 (patch-ay) = f5f1accdb11e404ba4779b056228431e3080e4cd
SHA1 (patch-erts_configure) = dba8d72974e8c493cf2bb90e6b149a84dd9073da
SHA1 (patch-erts_emulator_drivers_common_inet__drv.c) = b7784e5e8e025ca75d5279a63e0cb3f74c54bd6a
SHA1 (patch-erts_emulator_sys_common_erl__poll.c) = b2068ed4f1994407cb2ec3cd10220bebae85b01d
SHA1 (patch-erts_emulator_sys_unix_sys__uds.h) = 9b8cd1531f175a50a457ade054a3a1eb8349f2d0
SHA1 (patch-erts_etc_unix_run__erl.c) = 9e2377ceba5021eaa2f0c729600df499954d134e
SHA1 (patch-lib_crypto_c__src_Makefile.in) = 0ab1db36c03999524e933d60f913ff5608b0622e
SHA1 (patch-make_output.mk.in) = d7b3da58bfb471d52c41242e2a03d1598ce24e62

View file

@ -0,0 +1,18 @@
$NetBSD: patch-erts_emulator_sys_unix_sys__uds.h,v 1.1 2018/01/29 16:54:38 jperkin Exp $
Fix SunOS/C99.
--- erts/emulator/sys/unix/sys_uds.h.orig 2017-12-11 20:10:59.000000000 +0000
+++ erts/emulator/sys/unix/sys_uds.h
@@ -26,7 +26,11 @@
#endif
#if defined(__sun__) && !defined(_XOPEN_SOURCE)
+#if (__STDC_VERSION__-0 < 199901L)
#define _XOPEN_SOURCE 500
+#else
+#define _XOPEN_SOURCE 600
+#endif
#endif
#include <limits.h>

View file

@ -0,0 +1,16 @@
$NetBSD: patch-erts_etc_unix_run__erl.c,v 1.1 2018/01/29 16:54:38 jperkin Exp $
Fix SunOS/C99.
--- erts/etc/unix/run_erl.c.orig 2017-12-11 20:10:59.000000000 +0000
+++ erts/etc/unix/run_erl.c
@@ -41,6 +41,9 @@
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
+#ifdef __sun
+#define __EXTENSIONS__
+#endif
#ifdef HAVE_WORKING_POSIX_OPENPT
# ifndef _XOPEN_SOURCE
/* On OS X and BSD, we must leave _XOPEN_SOURCE undefined in order for