aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2017-02-14 16:41:19 +0100
committerSverker Eriksson <[email protected]>2017-02-20 20:06:37 +0100
commit28e6aeb8c0cc0e8b8821be957e3ee9c1eb015de6 (patch)
treee1072dd49c09e64a7aded067b46871b917ec9a02 /erts/emulator
parent839ad04bbacb329c89568371bbf5a28d4b2bba25 (diff)
downloadotp-28e6aeb8c0cc0e8b8821be957e3ee9c1eb015de6.tar.gz
otp-28e6aeb8c0cc0e8b8821be957e3ee9c1eb015de6.tar.bz2
otp-28e6aeb8c0cc0e8b8821be957e3ee9c1eb015de6.zip
Fix enif_select for windows
Diffstat (limited to 'erts/emulator')
-rw-r--r--erts/emulator/beam/erl_nif.h8
-rw-r--r--erts/emulator/sys/common/erl_check_io.c3
2 files changed, 7 insertions, 4 deletions
diff --git a/erts/emulator/beam/erl_nif.h b/erts/emulator/beam/erl_nif.h
index 9ff28a30cc..ac45f3ac81 100644
--- a/erts/emulator/beam/erl_nif.h
+++ b/erts/emulator/beam/erl_nif.h
@@ -138,9 +138,11 @@ typedef struct
void* ref_bin;
}ErlNifBinary;
-//#ifndef ERL_SYS_DRV
-typedef int ErlNifEvent; /* An event to be selected on. */
-//#endif
+#if (defined(__WIN32__) || defined(_WIN32) || defined(_WIN32_))
+typedef void* ErlNifEvent; /* FIXME: Use 'HANDLE' somehow without breaking existing source */
+#else
+typedef int ErlNifEvent;
+#endif
/* Return bits from enif_select: */
#define ERL_NIF_SELECT_STOP_CALLED (1 << 0)
diff --git a/erts/emulator/sys/common/erl_check_io.c b/erts/emulator/sys/common/erl_check_io.c
index 1c97df4201..8191b6e53f 100644
--- a/erts/emulator/sys/common/erl_check_io.c
+++ b/erts/emulator/sys/common/erl_check_io.c
@@ -201,7 +201,8 @@ static ERTS_INLINE ErtsDrvEventState* hash_new_drv_ev_state(ErtsSysFdType fd)
#if ERTS_CIO_HAVE_DRV_EVENT
tmpl.driver.event = NULL;
#endif
- tmpl.driver.drv_ptr = NULL;
+ tmpl.driver.nif = NULL;
+ tmpl.driver.stop.drv_ptr = NULL;
tmpl.events = 0;
tmpl.remove_cnt = 0;
tmpl.type = ERTS_EV_TYPE_NONE;