This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH glibc] Linux: Include <linux/sockios.h> in <bits/socket.h> under __USE_MISC
- From: Florian Weimer <fweimer at redhat dot com>
- To: Szabolcs Nagy <Szabolcs dot Nagy at arm dot com>
- Cc: Arnd Bergmann <arnd at arndb dot de>, nd <nd at arm dot com>, GNU C Library <libc-alpha at sourceware dot org>, "Sergei Trofimovich" <slyfox at gentoo dot org>, Networking <netdev at vger dot kernel dot org>, "Linux Kernel Mailing List" <linux-kernel at vger dot kernel dot org>, "David S. Miller" <davem at davemloft dot net>, Michael Kerrisk <mtk dot manpages at gmail dot com>, linux-man <linux-man at vger dot kernel dot org>
- Date: Mon, 22 Jul 2019 15:44:39 +0200
- Subject: Re: [PATCH glibc] Linux: Include <linux/sockios.h> in <bits/socket.h> under __USE_MISC
- References: <87ftmys3un.fsf@oldenburg2.str.redhat.com> <CAK8P3a0hC4wvjwCi4=DCET3C4qARMY6c58ffjwG3b1ZPM6kr-A@mail.gmail.com> <2431941f-3aac-d31f-e6f5-8ed2ed7b2e5c@arm.com>
* Szabolcs Nagy:
> (note: in musl these ioctl macros are in sys/ioctl.h
> which is not a posix header so namespace rules are
> less strict than for sys/socket.h and users tend to
> include it for ioctl())
<sys/ioctl.h> can be confusing because some of the constants may depend
on types that aren't declared by including the header. This makes their
macros unusable. Defining ioctl constants in headers which also provide
the matching types avoids that problem at least, also it can introduce
namespace issues.
Thanks,
Florian