diff options
author | Micael Karlberg <[email protected]> | 2019-06-25 17:32:21 +0200 |
---|---|---|
committer | Micael Karlberg <[email protected]> | 2019-06-26 10:28:30 +0200 |
commit | 6801adfbe71a633b1e36a8981bfa7001ff476607 (patch) | |
tree | 085ccfcc348781be5153bb0ff2bed94dece43a5a /erts | |
parent | e7ee9e1b3810d695f910d8a2fcdb38b04c8042b7 (diff) | |
download | otp-6801adfbe71a633b1e36a8981bfa7001ff476607.tar.gz otp-6801adfbe71a633b1e36a8981bfa7001ff476607.tar.bz2 otp-6801adfbe71a633b1e36a8981bfa7001ff476607.zip |
[esock] Moved new command inside ifdef
Build failed on windows because of misplaced ifdef's
(of new command functions).
OTP-15817
Diffstat (limited to 'erts')
-rw-r--r-- | erts/emulator/nifs/common/socket_nif.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/erts/emulator/nifs/common/socket_nif.c b/erts/emulator/nifs/common/socket_nif.c index c7af19d646..0145cae31b 100644 --- a/erts/emulator/nifs/common/socket_nif.c +++ b/erts/emulator/nifs/common/socket_nif.c @@ -1006,6 +1006,9 @@ ESOCK_NIF_FUNCS #undef ESOCK_NIF_FUNC_DEF +#if !defined(__WIN32__) + +/* And here comes the functions that does the actual work (for the most part) */ static BOOLEAN_T ecommand2command(ErlNifEnv* env, ERL_NIF_TERM ecommand, Uint16* command, @@ -1015,8 +1018,6 @@ static ERL_NIF_TERM ncommand(ErlNifEnv* env, ERL_NIF_TERM ecdata); static ERL_NIF_TERM ncommand_debug(ErlNifEnv* env, ERL_NIF_TERM ecdata); -#if !defined(__WIN32__) -/* And here comes the functions that does the actual work (for the most part) */ static ERL_NIF_TERM nsupports(ErlNifEnv* env, int key); static ERL_NIF_TERM nsupports_options(ErlNifEnv* env); static ERL_NIF_TERM nsupports_options_socket(ErlNifEnv* env); @@ -3088,6 +3089,9 @@ ERL_NIF_TERM nif_command(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]) { +#if defined(__WIN32__) + return enif_raise_exception(env, MKA(env, "notsup")); +#else ERL_NIF_TERM ecmd, ecdata, result; Uint16 cmd; @@ -3121,9 +3125,11 @@ ERL_NIF_TERM nif_command(ErlNifEnv* env, return result; +#endif } +#if !defined(__WIN32__) static ERL_NIF_TERM ncommand(ErlNifEnv* env, Uint16 cmd, ERL_NIF_TERM ecdata) { @@ -3167,7 +3173,7 @@ ERL_NIF_TERM ncommand_debug(ErlNifEnv* env, ERL_NIF_TERM ecdata) return result; } - +#endif /* ---------------------------------------------------------------------- |