Message ID | 20190616132343.26370-4-emil.l.velikov@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [libdrm,v2,1/4] meson.build: Fix typo | expand |
On 2019-06-16 15:23, Emil Velikov wrote: > From: Niclas Zeising <zeising@daemonic.se> > > FreeBSD requires sys/types.h for sys/sysctl.h, add it as part of the > includes when checking for headers. > Instead of splitting out the check for sys/sysctl.h from the other > header checks, just add sys/types.h to all header checks. > > v2 [Emil] > - add inline comment > - drop bash/sh hunk > > Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Signed-off-by: Niclas Zeising <zeising@daemonic.se> > --- > meson.build | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/meson.build b/meson.build > index ed407009..14f82b1f 100644 > --- a/meson.build > +++ b/meson.build > @@ -179,9 +179,12 @@ else > dep_rt = [] > endif > dep_m = cc.find_library('m', required : false) > +# From Niclas Zeising: > +# FreeBSD requires sys/types.h for sys/sysctl.h, add it as part of the > +# includes when checking for headers. > foreach header : ['sys/sysctl.h', 'sys/select.h', 'alloca.h'] > config.set('HAVE_' + header.underscorify().to_upper(), > - cc.compiles('#include <@0@>'.format(header), name : '@0@ works'.format(header))) > + cc.compiles('#include <sys/types.h>\n#include <@0@>'.format(header), name : '@0@ works'.format(header))) > endforeach > if cc.has_header_symbol('sys/sysmacros.h', 'major') > config.set10('MAJOR_IN_SYSMACROS', true) >
On Sunday, 2019-06-16 14:23:43 +0100, Emil Velikov wrote: > From: Niclas Zeising <zeising@daemonic.se> > > FreeBSD requires sys/types.h for sys/sysctl.h, add it as part of the > includes when checking for headers. > Instead of splitting out the check for sys/sysctl.h from the other > header checks, just add sys/types.h to all header checks. > > v2 [Emil] > - add inline comment > - drop bash/sh hunk > > Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Series is: Reviewed-by: Eric Engestrom <eric.engestrom@intel.com> But I agree with Emil, it's a FreeBSD bug for it to not include a required header, this should also be fixed upstream. > --- > meson.build | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/meson.build b/meson.build > index ed407009..14f82b1f 100644 > --- a/meson.build > +++ b/meson.build > @@ -179,9 +179,12 @@ else > dep_rt = [] > endif > dep_m = cc.find_library('m', required : false) > +# From Niclas Zeising: > +# FreeBSD requires sys/types.h for sys/sysctl.h, add it as part of the > +# includes when checking for headers. > foreach header : ['sys/sysctl.h', 'sys/select.h', 'alloca.h'] > config.set('HAVE_' + header.underscorify().to_upper(), > - cc.compiles('#include <@0@>'.format(header), name : '@0@ works'.format(header))) > + cc.compiles('#include <sys/types.h>\n#include <@0@>'.format(header), name : '@0@ works'.format(header))) > endforeach > if cc.has_header_symbol('sys/sysmacros.h', 'major') > config.set10('MAJOR_IN_SYSMACROS', true) > -- > 2.21.0 > > _______________________________________________ > dri-devel mailing list > dri-devel@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel
On 2019-06-17 11:14, Eric Engestrom wrote: > On Sunday, 2019-06-16 14:23:43 +0100, Emil Velikov wrote: >> From: Niclas Zeising <zeising@daemonic.se> >> >> FreeBSD requires sys/types.h for sys/sysctl.h, add it as part of the >> includes when checking for headers. >> Instead of splitting out the check for sys/sysctl.h from the other >> header checks, just add sys/types.h to all header checks. >> >> v2 [Emil] >> - add inline comment >> - drop bash/sh hunk >> >> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> > > Series is: > Reviewed-by: Eric Engestrom <eric.engestrom@intel.com> > > But I agree with Emil, it's a FreeBSD bug for it to not include > a required header, this should also be fixed upstream. I'm not sure if my e-mails are getting to the mailing list. This is the way it's documented in FreeBSD, and there is a lot of legacy reasons it is this way. I doubt it will change, and even if it does, there will be about 5 years of transition period before all supported releases has the change, most likely. This is the first time, to my knowledge, this issue has come up. (I'm not saying I disagree with you, just saying it's probably easier to patch here rather than try to change upstream.) Regards
On Monday, 2019-06-17 11:20:43 +0200, Niclas Zeising wrote: > On 2019-06-17 11:14, Eric Engestrom wrote: > > On Sunday, 2019-06-16 14:23:43 +0100, Emil Velikov wrote: > > > From: Niclas Zeising <zeising@daemonic.se> > > > > > > FreeBSD requires sys/types.h for sys/sysctl.h, add it as part of the > > > includes when checking for headers. > > > Instead of splitting out the check for sys/sysctl.h from the other > > > header checks, just add sys/types.h to all header checks. > > > > > > v2 [Emil] > > > - add inline comment > > > - drop bash/sh hunk > > > > > > Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> > > > > Series is: > > Reviewed-by: Eric Engestrom <eric.engestrom@intel.com> > > > > But I agree with Emil, it's a FreeBSD bug for it to not include > > a required header, this should also be fixed upstream. > > I'm not sure if my e-mails are getting to the mailing list. They are :) You can check the archive if you're not sure: https://lists.freedesktop.org/archives/dri-devel/2019-June/thread.html > This is the way > it's documented in FreeBSD, and there is a lot of legacy reasons it is this > way. I doubt it will change, and even if it does, there will be about 5 > years of transition period before all supported releases has the change, > most likely. > > This is the first time, to my knowledge, this issue has come up. > > (I'm not saying I disagree with you, just saying it's probably easier to > patch here rather than try to change upstream.) > > Regards > -- > Niclas If think we both agree then ;) I definitely agree with should have the workaround downstream, all I meant is that it's worth pushing upstream to fix the bug so that *eventually* not all downstream users needs to have the workaround (but yeah, that will take years to reach).
On 2019-06-17 15:44, Eric Engestrom wrote: > On Monday, 2019-06-17 11:20:43 +0200, Niclas Zeising wrote: >> On 2019-06-17 11:14, Eric Engestrom wrote: >>> On Sunday, 2019-06-16 14:23:43 +0100, Emil Velikov wrote: >>>> From: Niclas Zeising <zeising@daemonic.se> >>>> >>>> FreeBSD requires sys/types.h for sys/sysctl.h, add it as part of the >>>> includes when checking for headers. >>>> Instead of splitting out the check for sys/sysctl.h from the other >>>> header checks, just add sys/types.h to all header checks. >>>> >>>> v2 [Emil] >>>> - add inline comment >>>> - drop bash/sh hunk >>>> >>>> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> >>> >>> Series is: >>> Reviewed-by: Eric Engestrom <eric.engestrom@intel.com> >>> >>> But I agree with Emil, it's a FreeBSD bug for it to not include >>> a required header, this should also be fixed upstream. >> >> I'm not sure if my e-mails are getting to the mailing list. > > They are :) > > You can check the archive if you're not sure: > https://lists.freedesktop.org/archives/dri-devel/2019-June/thread.html > >> This is the way >> it's documented in FreeBSD, and there is a lot of legacy reasons it is this >> way. I doubt it will change, and even if it does, there will be about 5 >> years of transition period before all supported releases has the change, >> most likely. >> >> This is the first time, to my knowledge, this issue has come up. >> >> (I'm not saying I disagree with you, just saying it's probably easier to >> patch here rather than try to change upstream.) >> >> Regards >> -- >> Niclas > > If think we both agree then ;) > I definitely agree with should have the workaround downstream, all > I meant is that it's worth pushing upstream to fix the bug so that > *eventually* not all downstream users needs to have the workaround (but > yeah, that will take years to reach). > Just noticed that these patches still haven't been merged. What's the hold up? Thanks! Regards
diff --git a/meson.build b/meson.build index ed407009..14f82b1f 100644 --- a/meson.build +++ b/meson.build @@ -179,9 +179,12 @@ else dep_rt = [] endif dep_m = cc.find_library('m', required : false) +# From Niclas Zeising: +# FreeBSD requires sys/types.h for sys/sysctl.h, add it as part of the +# includes when checking for headers. foreach header : ['sys/sysctl.h', 'sys/select.h', 'alloca.h'] config.set('HAVE_' + header.underscorify().to_upper(), - cc.compiles('#include <@0@>'.format(header), name : '@0@ works'.format(header))) + cc.compiles('#include <sys/types.h>\n#include <@0@>'.format(header), name : '@0@ works'.format(header))) endforeach if cc.has_header_symbol('sys/sysmacros.h', 'major') config.set10('MAJOR_IN_SYSMACROS', true)