[PATCH 0/1] MR5580: ntdll/unix: Fix building on musl by explicitlyy including asm/ioctls.h
After commit 898ab8dab19d498c17859f39a55e317ee7e367a5 wine would no longer build on musl. Issue is that apparently TCSETS2 isn't defined when including sys/ioctl.h. A little digging shows that glibc goes ahead and includes asm/ioctls.h in sys/ioctl.h, providing said macro. Musl on the other hand doesn't and relies on bits/ioctl.h, which lacks said macro. Since there is no mention in the manpage about the need to include asm/ioctls.h, uncertain if that's an issue with musl or the manpage, would like some help on that front so I can go open PRs to fix that respectively. Signed-off-by: Fotios Valasiadis <fvalasiad(a)gmail.com> -- https://gitlab.winehq.org/wine/wine/-/merge_requests/5580
From: Fotios Valasiadis <fvalasiad(a)gmail.com> After commit 898ab8dab19d498c17859f39a55e317ee7e367a5 wine would no longer build on musl. Issue is that apparently TCSETS2 isn't defined when including sys/ioctl.h. A little digging shows that glibc goes ahead and includes asm/ioctls.h in sys/ioctl.h, providing said macro. Musl on the other hand doesn't and relies on bits/ioctl.h, which lacks said macro. Since there is no mention in the manpage about the need to include asm/ioctls.h, uncertain if that's an issue with musl or the manpage, would like some help on that front so I can go open PRs to fix that respectively. Signed-off-by: Fotios Valasiadis <fvalasiad(a)gmail.com> --- dlls/ntdll/unix/serial.c | 1 + 1 file changed, 1 insertion(+) diff --git a/dlls/ntdll/unix/serial.c b/dlls/ntdll/unix/serial.c index d48c49c87f6..951ed5d9386 100644 --- a/dlls/ntdll/unix/serial.c +++ b/dlls/ntdll/unix/serial.c @@ -41,6 +41,7 @@ #include <sys/stat.h> #include <sys/types.h> #include <sys/ioctl.h> +#include <asm/ioctls.h> #ifdef HAVE_SYS_FILIO_H # include <sys/filio.h> #endif -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/5580
I see mac complaining about the extra header. Perhaps a check should be added to the configure script and only then include the file? What should it check for? The existence of the header? The platform? Or perhaps an entirely different approach should be taken instead? I'd love to know! -- https://gitlab.winehq.org/wine/wine/-/merge_requests/5580#note_69669
Usually we check for the header using AC_CHECK_HEADERS; you can follow the example we use with other headers. FWIW, there's also a spelling error in the subject ("explicitlyy"). -- https://gitlab.winehq.org/wine/wine/-/merge_requests/5580#note_69721
participants (3)
-
Elizabeth Figura (@zfigura) -
Fotios Valasiadis -
Fotios Valasiadis (@fvalasiad)