mirror of
https://gitlab.com/apparmor/apparmor.git
synced 2025-03-09 02:41:03 +01:00
![]() The macros __BEGIN_DECLS and __END_DECLS are not conforming to any standard, but are a custom extension of the glibc library. As such, it may not be available in other libc implementations, with one example being musl libc. So compiling libapparmor won't work with a strictly standards-conforming library. These macros are typically used for header files which might be included in a C++ project. Depending on whether the header is seen by a C or C++ compiler, it will hint that functions have C linkage. The macros themselves are rather simple: #ifdef __cplusplus # define __BEGIN_DECLS extern "C" { # define __END_DECLS } #else # define __BEGIN_DECLS # define __END_DECLS #endif To fix compilation with musl libc, simply expand those macros to explicitly use `extern "C"`. This is already used in other parts of apparmor and should thus be safe to use. Signed-off-by: Patrick Steinhardt <ps@pks.im> |
||
---|---|---|
.. | ||
sys | ||
aalogparse.h | ||
Makefile.am |