Mesa 26.1.4's DRM UAPI headers include <sys/ioccom.h> as the BSD
include path for ioctl command encoding. The basic _IO / _IOR / _IOW /
_IOWR macros are already in <sys/ioctl.h> (musl-style via cbindgen),
but sys/ioccom.h adds the bitfield widths / masks / shifts / decoders
and the IOC_IN / IOC_OUT / IOC_INOUT / IOCSIZE_* macros that DRM and
other Linux UAPI consumers require.
This header includes <sys/ioctl.h> for the base macros and adds the
Linux-style constants as a thin shim. All new symbols are guarded
with #ifndef so including both headers is safe and idempotent.
This makes the Mesa-side 04-sys-ioccom-stub-header.patch redundant;
that patch can be removed from local/patches/mesa/ and the Mesa
recipe's patches list.
This was triggered by gcc for some reason It included sys/types.h and
assumed sys/select.h to be there. And that seams to be the case in musl.
The problem with relibc here is that sys/types.h is are part of relibc
"include/*.h" files, while sys/select.h is generated by cbindgen. That
makes it impossible to #include select.h in types.h epsecially that
there are files like fcntl.c that uses types.h. They would complain
about missing headers. I fixed this by renaming sys/types.h to
sys/types_internal.h and then generating types.h using cbindgen as well
except for that. however fcntl and dlmalloc can include types_internal
instead of types.h
This patch implements sys/user.h file that works for both x86_64 as well
as aarch64. This include file is used by sys/procfs.h which is needed
dependency for binutils. There is bug in this patch in aarch64 implementation
which is the lack of f128 implementation in rust, thus we can't create cbinding
for long double.