Conversation
Since Musl is sufficiently different from Glibc (see https://wiki.musl-libc.org/functional-differences-from-glibc.html), it requires additional checks for available headers.
|
@swift-ci test |
Co-authored-by: Saleem Abdulrasool <compnerd@compnerd.org>
|
@swift-ci test |
|
@swift-ci test windows |
2 similar comments
|
@swift-ci test windows |
|
@swift-ci test windows |
| #include <sys/param.h> | ||
|
|
||
| #if __has_include(<sys/cdefs.h>) | ||
| #if __has_include(<sys/cdefs.h>) && (defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__GLIBC__)) |
There was a problem hiding this comment.
I don't see why we're making this particular change. Musl (at least the copy I'm looking at) doesn't have <sys/cdefs.h>, so wouldn't have tried to include it anyway.
There was a problem hiding this comment.
On Alpine /usr/include/sys/cdefs.h is present and it contains #warning usage of non-standard #include <sys/cdefs.h> is deprecated, which fails due to our usage of -Werror.
There was a problem hiding this comment.
OK. I wonder if we can work out why we're including <sys/cdefs.h> and just not do that anywhere.
tests/dispatch_test.c
Outdated
| #elif __has_include(<poll.h>) | ||
| #include <poll.h> | ||
| #else | ||
| #include <sys/poll.h> |
There was a problem hiding this comment.
Is there a platform with <sys/poll.h> that doesn't also have <poll.h>? Could we just have <poll.h> here?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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>.
|
@swift-ci test |
|
@swift-ci test windows |
2 similar comments
|
@swift-ci test windows |
|
@swift-ci test windows |
|
@swift-ci test |
|
@swift-ci test windows |
Since Musl is sufficiently different from Glibc (see https://wiki.musl-libc.org/functional-differences-from-glibc.html), it requires additional checks for available headers.