[ruby-core:103080] [Ruby master Bug#17759] Correct `ioctl_req_t` for musl
From:
xtkoba+ruby@...
Date:
2021-03-29 09:05:38 UTC
List:
ruby-core #103080
Issue #17759 has been reported by xtkoba (Tee KOBAYASHI). ---------------------------------------- Bug #17759: Correct `ioctl_req_t` for musl https://bugs.ruby-lang.org/issues/17759 * Author: xtkoba (Tee KOBAYASHI) * Status: Open * Priority: Normal * Backport: 2.5: UNKNOWN, 2.6: UNKNOWN, 2.7: UNKNOWN, 3.0: UNKNOWN ---------------------------------------- The definition of `ioctl(2)` in musl is `int ioctl (int, int, ...);`, and this makes `io.c` fail to build on 64-bit musl environments with Clang/LLVM due to `shorten-64-to-32` error. A patch is attached for a workaround. It is expected to work with glibc, musl, bionic (Android), and uClibc (which defines `__GLIBC__`). I have no idea of other C libraries working on Linux. Aside from this patch, it might be better if we could supply `./configure` with the definition of `ioctl_req_t` using e.g. `rb_cv_ioctl_req_t_convertible=...`. ---Files-------------------------------- ruby-ioctl_req_t.patch (473 Bytes) -- https://bugs.ruby-lang.org/ Unsubscribe: <mailto:[email protected]?subject=unsubscribe> <http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>