summaryrefslogtreecommitdiff
path: root/misc/patches/gdnantive_arm_warnings.diff
blob: 4f1f085b8dc33be824cacbc2d4a86d806273c25c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
diff --git a/godot-cpp-3.x/godot-headers/gdnative/gdnative.h b/godot-cpp-3.x/godot-headers/gdnative/gdnative.h
index c0573d21b5d7a..ec95c4c4ebfcc 100644
--- a/godot-cpp-3.x/godot-headers/gdnative/gdnative.h
+++ b/godot-cpp-3.x/godot-headers/gdnative/gdnative.h
@@ -37,20 +37,24 @@ extern "C" {
 
 #if defined(_WIN32) || defined(__ANDROID__)
 #define GDCALLINGCONV
-#define GDAPI GDCALLINGCONV
+
 #elif defined(__APPLE__)
 #include "TargetConditionals.h"
 #if TARGET_OS_IPHONE
 #define GDCALLINGCONV __attribute__((visibility("default")))
-#define GDAPI GDCALLINGCONV
 #elif TARGET_OS_MAC
 #define GDCALLINGCONV __attribute__((sysv_abi))
-#define GDAPI GDCALLINGCONV
 #endif
-#else // !_WIN32 && !__APPLE__
+
+#else // Linux/BSD/Web
+#if defined(__aarch64__) || defined(__arm__)
+#define GDCALLINGCONV
+#else
 #define GDCALLINGCONV __attribute__((sysv_abi))
-#define GDAPI GDCALLINGCONV
 #endif
+#endif
+
+#define GDAPI GDCALLINGCONV
 
 // This is for libraries *using* the header, NOT GODOT EXPOSING STUFF!!
 #if !defined(GDN_EXPORT)