* limitations under the License.
*/
+#if WITH_DYNAMIC_BINDING
+
#define _GNU_SOURCE
#include <stdio.h>
#include <sys/stat.h>
#include "afb-api-so.h"
-#include "afb-api-so-v2.h"
#include "afb-api-so-v3.h"
#include "verbose.h"
#include "sig-monitor.h"
#if WITH_LEGACY_BINDING_VDYN
# include "afb-api-so-vdyn.h"
#endif
+#if WITH_LEGACY_BINDING_V2
+# include "afb-api-so-v2.h"
+#endif
struct safe_dlopen
{
if (rc)
return 0; /* yes version 3 */
+#if WITH_LEGACY_BINDING_V2
/* try the version 2 */
rc = afb_api_so_v2_add(path, handle, declare_set, call_set);
if (rc < 0) {
}
if (rc)
return 0; /* yes version 2 */
+#else
+ if (dlsym(handle, "afbBindingV2")) {
+ WARNING("binding [%s]: version 2 not supported", path);
+ obsolete = 1;
+ }
+#endif
#if WITH_LEGACY_BINDING_VDYN
/* try the version dyn */
return afb_api_so_add_pathset(pathset, declare_set, call_set, 0);
}
+#endif