* SIOCGSTAMPNS definition missing @ 2017-08-01 10:08 yamabiko 2017-08-12 0:53 ` Rich Felker 0 siblings, 1 reply; 7+ messages in thread From: yamabiko @ 2017-08-01 10:08 UTC (permalink / raw) To: musl Hello, when I tried to compile qemu on a Gentoo musl based system it complained about "SIOCGSTAMPNS" being undeclared. Using "-DSIOCGSTAMPNS=0x8907" as CFLAG worked as a workaround. So it looks like the definition it's missing from some header file (ioctl.h?) See https://forums.gentoo.org/viewtopic-t-1066924.html for more info ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: SIOCGSTAMPNS definition missing 2017-08-01 10:08 SIOCGSTAMPNS definition missing yamabiko @ 2017-08-12 0:53 ` Rich Felker 2017-08-13 16:03 ` Szabolcs Nagy 0 siblings, 1 reply; 7+ messages in thread From: Rich Felker @ 2017-08-12 0:53 UTC (permalink / raw) To: musl On Tue, Aug 01, 2017 at 10:08:02AM +0000, yamabiko@onenetbeyond.org wrote: > Hello, > when I tried to compile qemu on a Gentoo musl based system it > complained about "SIOCGSTAMPNS" being undeclared. Using > "-DSIOCGSTAMPNS=0x8907" as CFLAG worked as a workaround. So it looks > like the definition it's missing from some header file (ioctl.h?) > See https://forums.gentoo.org/viewtopic-t-1066924.html for more info Thanks for the report. Has anyone else looked at this yet? It probably needs per-arch additions to the bits/ioctl.h headers. Rich ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: SIOCGSTAMPNS definition missing 2017-08-12 0:53 ` Rich Felker @ 2017-08-13 16:03 ` Szabolcs Nagy 2017-08-13 16:35 ` Szabolcs Nagy 0 siblings, 1 reply; 7+ messages in thread From: Szabolcs Nagy @ 2017-08-13 16:03 UTC (permalink / raw) To: musl * Rich Felker <dalias@libc.org> [2017-08-11 20:53:38 -0400]: > On Tue, Aug 01, 2017 at 10:08:02AM +0000, yamabiko@onenetbeyond.org wrote: > > Hello, > > when I tried to compile qemu on a Gentoo musl based system it > > complained about "SIOCGSTAMPNS" being undeclared. Using > > "-DSIOCGSTAMPNS=0x8907" as CFLAG worked as a workaround. So it looks > > like the definition it's missing from some header file (ioctl.h?) > > See https://forums.gentoo.org/viewtopic-t-1066924.html for more info > > Thanks for the report. > > Has anyone else looked at this yet? It probably needs per-arch > additions to the bits/ioctl.h headers. > it seems to be defined in asm/sockios.h which is included via sys/socket.h in glibc i think so musl should put it into sys/socket.h if anywhere. ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: SIOCGSTAMPNS definition missing 2017-08-13 16:03 ` Szabolcs Nagy @ 2017-08-13 16:35 ` Szabolcs Nagy 2017-08-13 17:23 ` Rich Felker 0 siblings, 1 reply; 7+ messages in thread From: Szabolcs Nagy @ 2017-08-13 16:35 UTC (permalink / raw) To: musl * Szabolcs Nagy <nsz@port70.net> [2017-08-13 18:03:01 +0200]: > * Rich Felker <dalias@libc.org> [2017-08-11 20:53:38 -0400]: > > On Tue, Aug 01, 2017 at 10:08:02AM +0000, yamabiko@onenetbeyond.org wrote: > > > Hello, > > > when I tried to compile qemu on a Gentoo musl based system it > > > complained about "SIOCGSTAMPNS" being undeclared. Using > > > "-DSIOCGSTAMPNS=0x8907" as CFLAG worked as a workaround. So it looks > > > like the definition it's missing from some header file (ioctl.h?) > > > See https://forums.gentoo.org/viewtopic-t-1066924.html for more info > > > > Thanks for the report. > > > > Has anyone else looked at this yet? It probably needs per-arch > > additions to the bits/ioctl.h headers. > > > > it seems to be defined in asm/sockios.h which > is included via sys/socket.h in glibc i think so > musl should put it into sys/socket.h if anywhere. it seems i proposed the sockios stuff to be removed from ioctl.h, but that was not applied: http://www.openwall.com/lists/musl/2016/07/03/22 i think those sockios macros should be moved from ioctl.h to socket.h and the SIOCGSTAMPNS should be added to them. (or we can add the macro now to ioctl.h and move them later) one issue is that the mips macros are currently wrong (don't match the kernel uapi definitions). ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: SIOCGSTAMPNS definition missing 2017-08-13 16:35 ` Szabolcs Nagy @ 2017-08-13 17:23 ` Rich Felker 2017-08-13 20:46 ` [PATCH 1/2] fix mips ioctl macros to match linux asm/sockios.h Szabolcs Nagy 2017-08-13 20:47 ` [PATCH 2/2] add SIOCGSTAMPNS socket ioctl macro to ioctl.h Szabolcs Nagy 0 siblings, 2 replies; 7+ messages in thread From: Rich Felker @ 2017-08-13 17:23 UTC (permalink / raw) To: musl On Sun, Aug 13, 2017 at 06:35:15PM +0200, Szabolcs Nagy wrote: > * Szabolcs Nagy <nsz@port70.net> [2017-08-13 18:03:01 +0200]: > > > * Rich Felker <dalias@libc.org> [2017-08-11 20:53:38 -0400]: > > > On Tue, Aug 01, 2017 at 10:08:02AM +0000, yamabiko@onenetbeyond.org wrote: > > > > Hello, > > > > when I tried to compile qemu on a Gentoo musl based system it > > > > complained about "SIOCGSTAMPNS" being undeclared. Using > > > > "-DSIOCGSTAMPNS=0x8907" as CFLAG worked as a workaround. So it looks > > > > like the definition it's missing from some header file (ioctl.h?) > > > > See https://forums.gentoo.org/viewtopic-t-1066924.html for more info > > > > > > Thanks for the report. > > > > > > Has anyone else looked at this yet? It probably needs per-arch > > > additions to the bits/ioctl.h headers. > > > > > > > it seems to be defined in asm/sockios.h which > > is included via sys/socket.h in glibc i think so > > musl should put it into sys/socket.h if anywhere. > > it seems i proposed the sockios stuff to be removed > from ioctl.h, but that was not applied: > > http://www.openwall.com/lists/musl/2016/07/03/22 > > i think those sockios macros should be moved from > ioctl.h to socket.h and the SIOCGSTAMPNS should > be added to them. (or we can add the macro now > to ioctl.h and move them later) They're not in the reserved namespace for socket.h, and unless there's a strong legacy-compat argument for having them in socket.h, I think it's rather undesirable to put them there even under default ("BSD") feature profile since in practice almost everything uses the default. If almost nothing has broken so far from not having them in socket.h, that suggests to me that putting them there is probably undesirable. > one issue is that the mips macros are currently > wrong (don't match the kernel uapi definitions). Uhg. Rich ^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 1/2] fix mips ioctl macros to match linux asm/sockios.h 2017-08-13 17:23 ` Rich Felker @ 2017-08-13 20:46 ` Szabolcs Nagy 2017-08-13 20:47 ` [PATCH 2/2] add SIOCGSTAMPNS socket ioctl macro to ioctl.h Szabolcs Nagy 1 sibling, 0 replies; 7+ messages in thread From: Szabolcs Nagy @ 2017-08-13 20:46 UTC (permalink / raw) To: musl --- arch/mips/bits/ioctl.h | 10 +++++----- arch/mips64/bits/ioctl.h | 10 +++++----- arch/mipsn32/bits/ioctl.h | 10 +++++----- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/arch/mips/bits/ioctl.h b/arch/mips/bits/ioctl.h index accd7af2..793c66ee 100644 --- a/arch/mips/bits/ioctl.h +++ b/arch/mips/bits/ioctl.h @@ -139,11 +139,11 @@ struct winsize { #define N_SYNC_PPP 14 #define N_HCI 15 -#define FIOSETOWN 0x8901 -#define SIOCSPGRP 0x8902 -#define FIOGETOWN 0x8903 -#define SIOCGPGRP 0x8904 -#define SIOCATMARK 0x8905 +#define FIOGETOWN _IOR('f', 123, int) +#define FIOSETOWN _IOW('f', 124, int) +#define SIOCATMARK _IOR('s', 7, int) +#define SIOCSPGRP _IOW('s', 8, pid_t) +#define SIOCGPGRP _IOR('s', 9, pid_t) #define SIOCGSTAMP 0x8906 #define SIOCADDRT 0x890B diff --git a/arch/mips64/bits/ioctl.h b/arch/mips64/bits/ioctl.h index accd7af2..793c66ee 100644 --- a/arch/mips64/bits/ioctl.h +++ b/arch/mips64/bits/ioctl.h @@ -139,11 +139,11 @@ struct winsize { #define N_SYNC_PPP 14 #define N_HCI 15 -#define FIOSETOWN 0x8901 -#define SIOCSPGRP 0x8902 -#define FIOGETOWN 0x8903 -#define SIOCGPGRP 0x8904 -#define SIOCATMARK 0x8905 +#define FIOGETOWN _IOR('f', 123, int) +#define FIOSETOWN _IOW('f', 124, int) +#define SIOCATMARK _IOR('s', 7, int) +#define SIOCSPGRP _IOW('s', 8, pid_t) +#define SIOCGPGRP _IOR('s', 9, pid_t) #define SIOCGSTAMP 0x8906 #define SIOCADDRT 0x890B diff --git a/arch/mipsn32/bits/ioctl.h b/arch/mipsn32/bits/ioctl.h index accd7af2..793c66ee 100644 --- a/arch/mipsn32/bits/ioctl.h +++ b/arch/mipsn32/bits/ioctl.h @@ -139,11 +139,11 @@ struct winsize { #define N_SYNC_PPP 14 #define N_HCI 15 -#define FIOSETOWN 0x8901 -#define SIOCSPGRP 0x8902 -#define FIOGETOWN 0x8903 -#define SIOCGPGRP 0x8904 -#define SIOCATMARK 0x8905 +#define FIOGETOWN _IOR('f', 123, int) +#define FIOSETOWN _IOW('f', 124, int) +#define SIOCATMARK _IOR('s', 7, int) +#define SIOCSPGRP _IOW('s', 8, pid_t) +#define SIOCGPGRP _IOR('s', 9, pid_t) #define SIOCGSTAMP 0x8906 #define SIOCADDRT 0x890B -- 2.14.1 ^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 2/2] add SIOCGSTAMPNS socket ioctl macro to ioctl.h 2017-08-13 17:23 ` Rich Felker 2017-08-13 20:46 ` [PATCH 1/2] fix mips ioctl macros to match linux asm/sockios.h Szabolcs Nagy @ 2017-08-13 20:47 ` Szabolcs Nagy 1 sibling, 0 replies; 7+ messages in thread From: Szabolcs Nagy @ 2017-08-13 20:47 UTC (permalink / raw) To: musl it is defined in linux asm/sockios.h since commit ae40eb1ef30ab4120bd3c8b7e3da99ee53d27a23 (linux v2.6.22) but was missing from musl by accident. in musl the sockios macros are exposed in sys/ioctl.h together with other ioctl requests instead of in sys/socket.h because of namespace rules. (glibc has them in sys/socket.h under _GNU_SOURCE.) --- arch/generic/bits/ioctl.h | 1 + arch/mips/bits/ioctl.h | 1 + arch/mips64/bits/ioctl.h | 1 + arch/mipsn32/bits/ioctl.h | 1 + arch/powerpc/bits/ioctl.h | 1 + arch/powerpc64/bits/ioctl.h | 1 + arch/s390x/bits/ioctl.h | 1 + arch/sh/bits/ioctl.h | 1 + 8 files changed, 8 insertions(+) diff --git a/arch/generic/bits/ioctl.h b/arch/generic/bits/ioctl.h index c2035fc5..44deb11a 100644 --- a/arch/generic/bits/ioctl.h +++ b/arch/generic/bits/ioctl.h @@ -137,6 +137,7 @@ struct winsize { #define SIOCGPGRP 0x8904 #define SIOCATMARK 0x8905 #define SIOCGSTAMP 0x8906 +#define SIOCGSTAMPNS 0x8907 #define SIOCADDRT 0x890B #define SIOCDELRT 0x890C diff --git a/arch/mips/bits/ioctl.h b/arch/mips/bits/ioctl.h index 793c66ee..71394449 100644 --- a/arch/mips/bits/ioctl.h +++ b/arch/mips/bits/ioctl.h @@ -145,6 +145,7 @@ struct winsize { #define SIOCSPGRP _IOW('s', 8, pid_t) #define SIOCGPGRP _IOR('s', 9, pid_t) #define SIOCGSTAMP 0x8906 +#define SIOCGSTAMPNS 0x8907 #define SIOCADDRT 0x890B #define SIOCDELRT 0x890C diff --git a/arch/mips64/bits/ioctl.h b/arch/mips64/bits/ioctl.h index 793c66ee..71394449 100644 --- a/arch/mips64/bits/ioctl.h +++ b/arch/mips64/bits/ioctl.h @@ -145,6 +145,7 @@ struct winsize { #define SIOCSPGRP _IOW('s', 8, pid_t) #define SIOCGPGRP _IOR('s', 9, pid_t) #define SIOCGSTAMP 0x8906 +#define SIOCGSTAMPNS 0x8907 #define SIOCADDRT 0x890B #define SIOCDELRT 0x890C diff --git a/arch/mipsn32/bits/ioctl.h b/arch/mipsn32/bits/ioctl.h index 793c66ee..71394449 100644 --- a/arch/mipsn32/bits/ioctl.h +++ b/arch/mipsn32/bits/ioctl.h @@ -145,6 +145,7 @@ struct winsize { #define SIOCSPGRP _IOW('s', 8, pid_t) #define SIOCGPGRP _IOR('s', 9, pid_t) #define SIOCGSTAMP 0x8906 +#define SIOCGSTAMPNS 0x8907 #define SIOCADDRT 0x890B #define SIOCDELRT 0x890C diff --git a/arch/powerpc/bits/ioctl.h b/arch/powerpc/bits/ioctl.h index 6d49cf4e..d3771dd3 100644 --- a/arch/powerpc/bits/ioctl.h +++ b/arch/powerpc/bits/ioctl.h @@ -150,6 +150,7 @@ struct winsize { #define SIOCGPGRP 0x8904 #define SIOCATMARK 0x8905 #define SIOCGSTAMP 0x8906 +#define SIOCGSTAMPNS 0x8907 #define SIOCADDRT 0x890B #define SIOCDELRT 0x890C diff --git a/arch/powerpc64/bits/ioctl.h b/arch/powerpc64/bits/ioctl.h index 6d49cf4e..d3771dd3 100644 --- a/arch/powerpc64/bits/ioctl.h +++ b/arch/powerpc64/bits/ioctl.h @@ -150,6 +150,7 @@ struct winsize { #define SIOCGPGRP 0x8904 #define SIOCATMARK 0x8905 #define SIOCGSTAMP 0x8906 +#define SIOCGSTAMPNS 0x8907 #define SIOCADDRT 0x890B #define SIOCDELRT 0x890C diff --git a/arch/s390x/bits/ioctl.h b/arch/s390x/bits/ioctl.h index 11196e15..0ebac590 100644 --- a/arch/s390x/bits/ioctl.h +++ b/arch/s390x/bits/ioctl.h @@ -131,6 +131,7 @@ struct winsize { #define SIOCGPGRP 0x8904 #define SIOCATMARK 0x8905 #define SIOCGSTAMP 0x8906 +#define SIOCGSTAMPNS 0x8907 #define SIOCADDRT 0x890B #define SIOCDELRT 0x890C diff --git a/arch/sh/bits/ioctl.h b/arch/sh/bits/ioctl.h index e6e7d344..15256c51 100644 --- a/arch/sh/bits/ioctl.h +++ b/arch/sh/bits/ioctl.h @@ -141,6 +141,7 @@ struct winsize { #define SIOCSPGRP _IOW('s', 8, int) #define SIOCGPGRP _IOW('s', 9, int) #define SIOCGSTAMP _IOR('s', 100, char[8]) +#define SIOCGSTAMPNS _IOR('s', 101, char[8]) #define SIOCADDRT 0x890B #define SIOCDELRT 0x890C -- 2.14.1 ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2017-08-13 20:47 UTC | newest] Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2017-08-01 10:08 SIOCGSTAMPNS definition missing yamabiko 2017-08-12 0:53 ` Rich Felker 2017-08-13 16:03 ` Szabolcs Nagy 2017-08-13 16:35 ` Szabolcs Nagy 2017-08-13 17:23 ` Rich Felker 2017-08-13 20:46 ` [PATCH 1/2] fix mips ioctl macros to match linux asm/sockios.h Szabolcs Nagy 2017-08-13 20:47 ` [PATCH 2/2] add SIOCGSTAMPNS socket ioctl macro to ioctl.h Szabolcs Nagy
Code repositories for project(s) associated with this public inbox https://git.vuxu.org/mirror/musl/ This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).