Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect usage of an internal Glibc header (sys/cdefs.h) #94

Open
xplshn opened this issue Apr 11, 2024 · 0 comments
Open

Incorrect usage of an internal Glibc header (sys/cdefs.h) #94

xplshn opened this issue Apr 11, 2024 · 0 comments

Comments

@xplshn
Copy link

xplshn commented Apr 11, 2024

/usr/include/sys/cdefs.h:4:2: warning: usage of non-standard #include <sys/cdefs.h> is deprecated [-W#warnings]
    4 | #warning usage of non-standard #include <sys/cdefs.h> is deprecated

Developers like to wrongly include sys/cdefs.h to use the _*_DECLS macros. This is a bug and the correct way to do it is to use:

#ifdef __cplusplus
extern "C" {
#endif

Instead of:

#ifdef __cplusplus
}
#endif

And instead of _END_DECLS

https://wiki.gentoo.org/wiki/Musl_porting_notes

This causes problems on other OSes, like Illumos based ones, such as OpenIndiana, and also when */Linux based distros that use Musl, uClibc, Bionic libc (Android libc) or anything other than glibc try to compile libxo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant