diff options
author | Sverker Eriksson <[email protected]> | 2018-03-16 20:57:41 +0100 |
---|---|---|
committer | Sverker Eriksson <[email protected]> | 2018-03-22 16:22:34 +0100 |
commit | cbc7ef1f665423aabba3836b79017682ca1b0816 (patch) | |
tree | ea8e8d8a380332697a196c91a119c38f02038149 /erts/emulator/beam/erl_nif.h | |
parent | 0c33c7eb6642adf974fcd2b0426198bd666d28e2 (diff) | |
download | otp-cbc7ef1f665423aabba3836b79017682ca1b0816.tar.gz otp-cbc7ef1f665423aabba3836b79017682ca1b0816.tar.bz2 otp-cbc7ef1f665423aabba3836b79017682ca1b0816.zip |
erts: Improve NIF load incompatibility errors
Diffstat (limited to 'erts/emulator/beam/erl_nif.h')
-rw-r--r-- | erts/emulator/beam/erl_nif.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/erts/emulator/beam/erl_nif.h b/erts/emulator/beam/erl_nif.h index 30eff9fcb9..e051ecb26e 100644 --- a/erts/emulator/beam/erl_nif.h +++ b/erts/emulator/beam/erl_nif.h @@ -57,6 +57,7 @@ */ #define ERL_NIF_MAJOR_VERSION 2 #define ERL_NIF_MINOR_VERSION 14 +#define ERL_NIF_MIN_ERTS_VERSION "erts-10.0 (OTP-21)" /* * The emulator will refuse to load a nif-lib with a major version @@ -131,6 +132,9 @@ typedef struct enif_entry_t /* Added in 2.12 */ size_t sizeof_ErlNifResourceTypeInit; + + /* Added in 2.14 */ + const char* min_erts; }ErlNifEntry; @@ -353,7 +357,8 @@ ERL_NIF_INIT_DECL(NAME) \ LOAD, RELOAD, UPGRADE, UNLOAD, \ ERL_NIF_VM_VARIANT, \ 1, \ - sizeof(ErlNifResourceTypeInit) \ + sizeof(ErlNifResourceTypeInit), \ + ERL_NIF_MIN_ERTS_VERSION \ }; \ ERL_NIF_INIT_BODY; \ return &entry; \ |