From 52b32ed533a5c91bf45696b1e4b5b5682df4bc17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Fri, 8 Dec 2023 13:15:28 +0100 Subject: [PATCH] GDNative: Fix Linux arm64 warning about ignored `sysv_abi` attribute Fixes #41160. --- modules/gdnative/include/gdnative/gdnative.h | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/modules/gdnative/include/gdnative/gdnative.h b/modules/gdnative/include/gdnative/gdnative.h index c0573d21b5d..ec95c4c4ebf 100644 --- a/modules/gdnative/include/gdnative/gdnative.h +++ b/modules/gdnative/include/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__) +#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)