]> git.bitcoin.ninja Git - ldk-java/commitdiff
Support OSX (ie builds where int64_t is not an alias for jlong)
authorMatt Corallo <git@bluematt.me>
Mon, 14 Jun 2021 19:51:41 +0000 (19:51 +0000)
committerMatt <matt@Matts-iMac-Pro.local>
Tue, 15 Jun 2021 20:38:08 +0000 (16:38 -0400)
java_strings.py

index 624f46d5c192e5c3039996bd6a88e58e76bfd44f..25eec48e83ca9762522e8a5f322efa512c54efb3 100644 (file)
@@ -86,7 +86,10 @@ class CommonBase {
 }
 """
 
-        self.c_file_pfx = """#include \"org_ldk_impl_bindings.h\"
+        self.c_file_pfx = """#include <jni.h>
+// On OSX jlong (ie long long) is not equivalent to int64_t, so we override here
+#define int64_t jlong
+#include \"org_ldk_impl_bindings.h\"
 #include <lightning.h>
 #include <string.h>
 #include <stdatomic.h>