diff --git a/libraries/AP_Common/c++.cpp b/libraries/AP_Common/c++.cpp index 107d7fb045..64d25d4298 100644 --- a/libraries/AP_Common/c++.cpp +++ b/libraries/AP_Common/c++.cpp @@ -19,3 +19,17 @@ void operator delete(void *p) if (p) free(p); } + +__extension__ typedef int __guard __attribute__((mode (__DI__))); + +int __cxa_guard_acquire(__guard *g) +{ + return !*(char *)(g); +}; + +void __cxa_guard_release (__guard *g) +{ + *(char *)g = 1; +}; + +void __cxa_guard_abort (__guard *) {};