diff options
author | Micael Karlberg <[email protected]> | 2018-12-19 13:04:28 +0100 |
---|---|---|
committer | Micael Karlberg <[email protected]> | 2018-12-21 12:23:28 +0100 |
commit | cc553264b4a6e06377b34c06858f75f3a17319de (patch) | |
tree | 315eb43910c1ee3545619118c973cb3f5ca53b81 /erts/emulator/nifs/common/socket_nif.c | |
parent | 6a0772d1af0cd36915736ff65a450a618209fec1 (diff) | |
download | otp-cc553264b4a6e06377b34c06858f75f3a17319de.tar.gz otp-cc553264b4a6e06377b34c06858f75f3a17319de.tar.bz2 otp-cc553264b4a6e06377b34c06858f75f3a17319de.zip |
[socket-nif] Fixed OpenBSD config
The macro (define) IPTOS_MINCOST does not exist
on OpenBSD 6.3.
OTP-14831
Diffstat (limited to 'erts/emulator/nifs/common/socket_nif.c')
-rw-r--r-- | erts/emulator/nifs/common/socket_nif.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/erts/emulator/nifs/common/socket_nif.c b/erts/emulator/nifs/common/socket_nif.c index 80903c487f..6dcd4ae623 100644 --- a/erts/emulator/nifs/common/socket_nif.c +++ b/erts/emulator/nifs/common/socket_nif.c @@ -15198,9 +15198,11 @@ char* encode_cmsghdr_data_ip(ErlNifEnv* env, case IPTOS_RELIABILITY: *eCMsgHdrData = esock_atom_reliability; break; +#if defined(IPTOS_MINCOST) case IPTOS_MINCOST: *eCMsgHdrData = esock_atom_mincost; break; +#endif default: *eCMsgHdrData = MKUI(env, tos); break; @@ -15467,9 +15469,11 @@ BOOLEAN_T decode_ip_tos(ErlNifEnv* env, ERL_NIF_TERM eVal, int* val) } else if (COMPARE(eVal, esock_atom_reliability) == 0) { *val = IPTOS_RELIABILITY; result = TRUE; +#if defined(IPTOS_MINCOST) } else if (COMPARE(eVal, esock_atom_mincost) == 0) { *val = IPTOS_MINCOST; result = TRUE; +#endif } else { *val = -1; result = FALSE; @@ -15781,9 +15785,11 @@ ERL_NIF_TERM encode_ip_tos(ErlNifEnv* env, int val) result = esock_make_ok2(env, esock_atom_reliability); break; +#if defined(IPTOS_MINCOST) case IPTOS_MINCOST: result = esock_make_ok2(env, esock_atom_mincost); break; +#endif default: result = esock_make_ok2(env, MKI(env, val)); |