aboutsummaryrefslogtreecommitdiffstats
path: root/erts/etc/unix
diff options
context:
space:
mode:
Diffstat (limited to 'erts/etc/unix')
-rw-r--r--erts/etc/unix/etp-commands.in2
-rw-r--r--erts/etc/unix/run_erl.c18
2 files changed, 12 insertions, 8 deletions
diff --git a/erts/etc/unix/etp-commands.in b/erts/etc/unix/etp-commands.in
index 0d45efd606..4dc24d68b4 100644
--- a/erts/etc/unix/etp-commands.in
+++ b/erts/etc/unix/etp-commands.in
@@ -776,7 +776,7 @@ define etp-pid-1
if ($etp_pid_1 & 0xF) == 0x3
if (etp_arch_bits == 64)
if (etp_big_endian)
- set $etp_pid_data = (unsigned) ((((Uint64) $etp_pid_1) >> 36) & 0x0fffffff)
+ set $etp_pid_data = (unsigned) ((((Uint64) $etp_pid_1) >> 35) & 0x0fffffff)
else
set $etp_pid_data = (unsigned) ((((Uint64) $etp_pid_1) >> 4) & 0x0fffffff)
end
diff --git a/erts/etc/unix/run_erl.c b/erts/etc/unix/run_erl.c
index 44efb975ba..30210ac172 100644
--- a/erts/etc/unix/run_erl.c
+++ b/erts/etc/unix/run_erl.c
@@ -42,9 +42,14 @@
# include "config.h"
#endif
#ifdef HAVE_WORKING_POSIX_OPENPT
-#ifndef _XOPEN_SOURCE
-#define _XOPEN_SOURCE 600
-#endif
+# ifndef _XOPEN_SOURCE
+ /* On OS X and BSD, we must leave _XOPEN_SOURCE undefined in order for
+ * the prototype of vsyslog() to be included.
+ */
+# if !(defined(__APPLE__) || defined(__FreeBSD__) || defined(__DragonFly__))
+# define _XOPEN_SOURCE 600
+# endif
+# endif
#endif
#include <sys/types.h>
#include <sys/wait.h>
@@ -64,10 +69,6 @@
#include <termios.h>
#include <time.h>
-#ifdef __ANDROID__
-# include <termios.h>
-#endif
-
#ifdef HAVE_SYSLOG_H
# include <syslog.h>
#endif
@@ -77,6 +78,9 @@
#ifdef HAVE_UTMP_H
# include <utmp.h>
#endif
+#ifdef HAVE_LIBUTIL_H
+# include <libutil.h>
+#endif
#ifdef HAVE_UTIL_H
# include <util.h>
#endif