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

Add support for Musl libc #798

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion os/generic_unix_base.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#endif
#include <sys/param.h>

#if __has_include(<sys/cdefs.h>)
#if __has_include(<sys/cdefs.h>) && defined(__GLIBC__)
MaxDesiatov marked this conversation as resolved.
Show resolved Hide resolved
#include <sys/cdefs.h>
#endif

Expand Down
2 changes: 2 additions & 0 deletions tests/dispatch_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@
#if __has_include(<sys/event.h>)
#define HAS_SYS_EVENT_H 1
#include <sys/event.h>
#elif __has_include(<poll.h>)
#include <poll.h>
#else
#include <sys/poll.h>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a platform with <sys/poll.h> that doesn't also have <poll.h>? Could we just have <poll.h> here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure, I'm a bit afraid to touch this, as this repo may have support for OpenBSD, FreeBSD etc, but we don't have CI set up for those to verify those don't break.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Those aren't officially supported platforms; I wouldn't worry too much about breaking them anyway, but in this particular case both OpenBSD and FreeBSD document poll as being in <poll.h>.

#endif
Expand Down