summaryrefslogtreecommitdiff
path: root/misc/patches/gdnantive_arm_warnings.diff
diff options
context:
space:
mode:
authorFabio Alessandrelli <fabio.alessandrelli@gmail.com>2024-02-16 00:24:31 +0100
committerGitHub <noreply@github.com>2024-02-16 00:24:31 +0100
commit762365d20a2a7282c906ee170c644a3a96be3a21 (patch)
tree1bc5e49105e01d8961a9d1e5c65b887070f63616 /misc/patches/gdnantive_arm_warnings.diff
parent7141bc487ec76c336fe1775d58771cecdb507957 (diff)
parent34ef1043ee1783f8ab20e74a8f883a235a96d629 (diff)
downloadfork-godot-webrtc-native-762365d20a2a7282c906ee170c644a3a96be3a21.tar.gz
fork-godot-webrtc-native-762365d20a2a7282c906ee170c644a3a96be3a21.tar.bz2
fork-godot-webrtc-native-762365d20a2a7282c906ee170c644a3a96be3a21.zip
Merge pull request #138 from Faless/linux/arms
[Linux] Add arm32/arm64 linux builds support
Diffstat (limited to 'misc/patches/gdnantive_arm_warnings.diff')
-rw-r--r--misc/patches/gdnantive_arm_warnings.diff34
1 files changed, 34 insertions, 0 deletions
diff --git a/misc/patches/gdnantive_arm_warnings.diff b/misc/patches/gdnantive_arm_warnings.diff
new file mode 100644
index 0000000..4f1f085
--- /dev/null
+++ b/misc/patches/gdnantive_arm_warnings.diff
@@ -0,0 +1,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)