]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
module: require apiver for every module
authorMarek Vavruša <marek.vavrusa@nic.cz>
Sun, 12 Apr 2015 19:44:29 +0000 (21:44 +0200)
committerMarek Vavruša <marek.vavrusa@nic.cz>
Sun, 12 Apr 2015 19:44:29 +0000 (21:44 +0200)
lib/module.c

index cc4ba6e5eedb679f38ea599689e16bcc483b08ff..e73db880986fe279c81e0d4199c24d2aac63314e 100644 (file)
 
 /** Check ABI version, return error on mismatch. */
 #define ABI_CHECK(m, prefix, symname, required) do { \
-       if ((m)->lib != RTLD_DEFAULT) { \
-               module_api_cb *_api = NULL; \
-               *(void **) (&_api) = load_symbol((m)->lib, (prefix), (symname)); \
-               if (_api == NULL) { \
-                       return kr_error(ENOENT); \
-               } \
-               if (_api() != (required)) { \
-                       return kr_error(ENOTSUP); \
-               } \
-       }\
+       module_api_cb *_api = NULL; \
+       *(void **) (&_api) = load_symbol((m)->lib, (prefix), (symname)); \
+       if (_api == NULL) { \
+               return kr_error(ENOENT); \
+       } \
+       if (_api() != (required)) { \
+               return kr_error(ENOTSUP); \
+       } \
 } while (0)
 
 /** Load ABI by symbol names. */