summaryrefslogtreecommitdiff
path: root/foreign.c
diff options
context:
space:
mode:
Diffstat (limited to 'foreign.c')
-rw-r--r--foreign.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/foreign.c b/foreign.c
index 6ad9011..462195a 100644
--- a/foreign.c
+++ b/foreign.c
@@ -4,6 +4,14 @@
#if CHAR_BIT != 8
#error "Compile-time foreign functions can only be used on systems where CHAR_BIT is 8."
#endif
+
+/* avcall has some sign conversion problems on BSD */
+/* (the macros it defines cause problems too, which is why this is ignored for so long) */
+
+#ifdef __clang__
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wsign-conversion"
+#endif
#include <avcall.h>
#include <dlfcn.h>
@@ -272,6 +280,10 @@ static bool arg_list_add(av_alist *arg_list, Value val, Type *type, Location whe
return true;
}
+#ifdef __clang__
+#pragma clang diagnostic pop
+#endif
+
static void ffmgr_create(ForeignFnManager *ffmgr, Allocator *allocr) {
str_hash_table_create(&ffmgr->libs_loaded, sizeof(Library), allocr);
}