From d443097778e22c51173aaa22b71303b05a89cf84 Mon Sep 17 00:00:00 2001 From: Rickard Green Date: Mon, 28 Jan 2019 14:39:17 +0100 Subject: Fix build of erl_interface on BSD --- lib/erl_interface/include/ei.h | 2 ++ lib/erl_interface/src/connect/ei_connect.c | 6 ++---- lib/erl_interface/src/misc/ei_portio.c | 11 +++++++---- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/lib/erl_interface/include/ei.h b/lib/erl_interface/include/ei.h index 92674571e2..dffaf4f27c 100644 --- a/lib/erl_interface/include/ei.h +++ b/lib/erl_interface/include/ei.h @@ -36,6 +36,8 @@ #include #include typedef LONG_PTR ssize_t; /* Sigh... */ +#else +#include /* ssize_t */ #endif #include /* Need type FILE */ diff --git a/lib/erl_interface/src/connect/ei_connect.c b/lib/erl_interface/src/connect/ei_connect.c index 1132c9fc23..206b185e96 100644 --- a/lib/erl_interface/src/connect/ei_connect.c +++ b/lib/erl_interface/src/connect/ei_connect.c @@ -21,6 +21,8 @@ * Purpose: Connect to any node at any host. (EI version) */ +#include "eidef.h" + #include #include #include @@ -40,10 +42,8 @@ #include #include -#include #include #include -#include #include #include #include @@ -53,7 +53,6 @@ #else /* some other unix */ #include -#include #include #if TIME_WITH_SYS_TIME @@ -84,7 +83,6 @@ #include #include -#include "eidef.h" #include "eiext.h" #include "ei_portio.h" #include "ei_internal.h" diff --git a/lib/erl_interface/src/misc/ei_portio.c b/lib/erl_interface/src/misc/ei_portio.c index 726b1af82d..368c56546b 100644 --- a/lib/erl_interface/src/misc/ei_portio.c +++ b/lib/erl_interface/src/misc/ei_portio.c @@ -19,6 +19,9 @@ * */ + +#include "eidef.h" + #ifdef __WIN32__ #include #include @@ -47,10 +50,8 @@ static unsigned long param_one = 1; #include #include #include -#include #include #include -#include #include #include #include @@ -65,7 +66,6 @@ static unsigned long param_one = 1; #else /* other unix */ #include -#include #include #include #include @@ -86,6 +86,7 @@ static unsigned long param_one = 1; /* common includes */ +#include #include #include #include @@ -94,7 +95,9 @@ static unsigned long param_one = 1; #else #include #endif -#include "eidef.h" +#ifdef HAVE_SYS_SELECT_H +#include +#endif #include "ei_portio.h" #include "ei_internal.h" -- cgit v1.2.3