aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--erts/configure.in2
-rw-r--r--erts/etc/unix/run_erl.c11
2 files changed, 6 insertions, 7 deletions
diff --git a/erts/configure.in b/erts/configure.in
index cae3843465..1d15ae467c 100644
--- a/erts/configure.in
+++ b/erts/configure.in
@@ -1623,7 +1623,7 @@ AC_CHECK_HEADERS(fcntl.h limits.h unistd.h syslog.h dlfcn.h ieeefp.h \
sys/ioctl.h sys/time.h sys/uio.h \
sys/socket.h sys/sockio.h sys/socketio.h \
net/errno.h malloc.h arpa/nameser.h libdlpi.h \
- pty.h util.h utmp.h langinfo.h poll.h sdkddkver.h)
+ pty.h util.h libutil.h utmp.h langinfo.h poll.h sdkddkver.h)
AC_CHECK_MEMBERS([struct ifreq.ifr_hwaddr], [], [],
[#ifdef __WIN32__
diff --git a/erts/etc/unix/run_erl.c b/erts/etc/unix/run_erl.c
index 22302d539a..30210ac172 100644
--- a/erts/etc/unix/run_erl.c
+++ b/erts/etc/unix/run_erl.c
@@ -43,10 +43,10 @@
#endif
#ifdef HAVE_WORKING_POSIX_OPENPT
# ifndef _XOPEN_SOURCE
- /* On OS X, we must leave _XOPEN_SOURCE undefined in order for
+ /* On OS X and BSD, we must leave _XOPEN_SOURCE undefined in order for
* the prototype of vsyslog() to be included.
*/
-# ifndef __APPLE__
+# if !(defined(__APPLE__) || defined(__FreeBSD__) || defined(__DragonFly__))
# define _XOPEN_SOURCE 600
# endif
# endif
@@ -69,10 +69,6 @@
#include <termios.h>
#include <time.h>
-#ifdef __ANDROID__
-# include <termios.h>
-#endif
-
#ifdef HAVE_SYSLOG_H
# include <syslog.h>
#endif
@@ -82,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