On 18.04.2018 06:56, Michael van Elst wrote: > On Wed, Apr 18, 2018 at 01:36:23AM +0200, Kamil Rytarowski wrote: > >> Looking at other users, everyone except <dev/biovar.h> include >> <sys/device.h> in the _KERNEL namespace. > > It defines internal kernel data structures. Normal programs must > not see it, that's why it was hidden and finally all uses were removed > from userland, so it only exists in _KERNEL namespace. > > But crash(8) is a hybrid, because it is mostly ddb code compiled for > userland. > > Anyway, I think sys/pmf.h is only included for the declaration of > pmf_qual_t and that is only used for some function declarations that > are for _KERNEL only. Can you please try: > > Index: sys/device.h > =================================================================== > RCS file: /cvsroot/src/sys/sys/device.h,v > retrieving revision 1.151 > diff -p -u -r1.151 device.h > --- sys/device.h 4 Mar 2018 07:13:11 -0000 1.151 > +++ sys/device.h 18 Apr 2018 04:53:14 -0000 > @@ -84,6 +84,9 @@ > #if defined(_KERNEL) || defined(_KMEMUSER) > #include <sys/mutex.h> > #include <sys/condvar.h> > +#endif > + > +#if defined(_KERNEL) > #include <sys/pmf.h> > #endif > > I'm verifying against a regular build. > > > Greetings, > This change is not sufficient: In file included from /public/llvm/projects/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_netbsd.cc:97: In file included from /usr/include/dev/biovar.h:40: /usr/include/sys/device.h:169:45: error: unknown type name 'pmf_qual_t' In file included from /public/llvm/projects/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_netbsd.cc:97: In file included from /usr/include/dev/biovar.h:40: /usr/include/sys/device.h:169:45: error: unknown type name 'pmf_qual_t' In file included from /public/llvm/projects/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_netbsd.cc:97: In file included from /usr/include/dev/biovar.h:40: /usr/include/sys/device.h:169:45: error: unknown type name 'pmf_qual_t' In file included from /public/llvm/projects/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_netbsd.cc:97: In file included from /public/llvm/projects/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_netbsd.cc:97: In file included from /usr/include/dev/biovar.h:40: /usr/include/sys/device.h:169:45: error: unknown type name 'pmf_qual_t' In file included from /usr/include/dev/biovar.h:40: In file included from /public/llvm/projects/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_netbsd.cc:97: /usr/include/sys/device.h:169:45: error: unknown type name 'pmf_qual_t' In file included from /usr/include/dev/biovar.h:40: /usr/include/sys/device.h:169:45: error: unknown type name 'pmf_qual_t' [ 49%] Built target LLVMBPFDesc bool (*dv_driver_suspend)(device_t, const pmf_qual_t *); ^ /usr/include/sys/device.h:170:44: error: unknown type name 'pmf_qual_t' bool (*dv_driver_resume)(device_t, const pmf_qual_t *); ^ /usr/include/sys/device.h:175:42: error: unknown type name 'pmf_qual_t' bool (*dv_bus_suspend)(device_t, const pmf_qual_t *); ^ bool (*dv_driver_suspend)(device_t, const pmf_qual_t *); ^ /usr/include/sys/device.h:170:44: error: unknown type name 'pmf_qual_t' bool (*dv_driver_resume)(device_t, const pmf_qual_t *); ^ bool (*dv_driver_suspend)(device_t, const pmf_qual_t *); ^ /usr/include/sys/device.h:170:44: error: unknown type name 'pmf_qual_t' bool (*dv_driver_resume)(device_t, const pmf_qual_t *); ^ bool (*dv_driver_suspend)(device_t, const pmf_qual_t *); ^ /usr/include/sys/device.h:170:44: error: unknown type name 'pmf_qual_t' bool (*dv_driver_resume)(device_t, const pmf_qual_t *); ^ /usr/include/sys/device.h:175:42: error: unknown type name 'pmf_qual_t' bool (*dv_bus_suspend)(device_t, const pmf_qual_t *); ^ bool (*dv_driver_suspend)(device_t, const pmf_qual_t *); ^ /usr/include/sys/device.h:170:44: error: unknown type name 'pmf_qual_t' bool (*dv_driver_resume)(device_t, const pmf_qual_t *); ^ bool (*dv_driver_suspend)(device_t, const pmf_qual_t *); ^ /usr/include/sys/device.h:170:44: error: unknown type name 'pmf_qual_t' bool (*dv_driver_resume)(device_t, const pmf_qual_t *); ^ /usr/include/sys/device.h:175:42: error: unknown type name 'pmf_qual_t' /usr/include/sys/device.h:176:41: error: unknown type name 'pmf_qual_t' bool (*dv_bus_suspend)(device_t, const pmf_qual_t *); ^ bool (*dv_bus_resume)(device_t, const pmf_qual_t *); ^ /usr/include/sys/device.h:175:42: error: unknown type name 'pmf_qual_t' bool (*dv_bus_suspend)(device_t, const pmf_qual_t *); ^ /usr/include/sys/device.h:175:42: error: unknown type name 'pmf_qual_t' bool (*dv_bus_suspend)(device_t, const pmf_qual_t *); ^ /usr/include/sys/device.h:175:42: error: unknown type name 'pmf_qual_t' bool (*dv_bus_suspend)(device_t, const pmf_qual_t *); ^ /usr/include/sys/device.h:176:41: error: unknown type name 'pmf_qual_t' bool (*dv_bus_resume)(device_t, const pmf_qual_t *); ^ /usr/include/sys/device.h:181:44: error: unknown type name 'pmf_qual_t' /usr/include/sys/device.h:176:41: error: unknown type name 'pmf_qual_t' bool (*dv_class_suspend)(device_t, const pmf_qual_t *); ^ bool (*dv_bus_resume)(device_t, const pmf_qual_t *); ^ /usr/include/sys/device.h:176:41: error: unknown type name 'pmf_qual_t' bool (*dv_bus_resume)(device_t, const pmf_qual_t *); ^ /usr/include/sys/device.h:176:41: error: unknown type name 'pmf_qual_t' bool (*dv_bus_resume)(device_t, const pmf_qual_t *); ^ /usr/include/sys/device.h:176:41: error: unknown type name 'pmf_qual_t' bool (*dv_bus_resume)(device_t, const pmf_qual_t *); ^ /usr/include/sys/device.h:181:44: error: unknown type name 'pmf_qual_t' bool (*dv_class_suspend)(device_t, const pmf_qual_t *); ^ /usr/include/sys/device.h:182:43: error: unknown type name 'pmf_qual_t' bool (*dv_class_resume)(device_t, const pmf_qual_t *); ^ /usr/include/sys/device.h:181:44: error: unknown type name 'pmf_qual_t' bool (*dv_class_suspend)(device_t, const pmf_qual_t *); ^ /usr/include/sys/device.h:181:44: error: unknown type name 'pmf_qual_t' bool (*dv_class_suspend)(device_t, const pmf_qual_t *); ^ /usr/include/sys/device.h:181:44: error: unknown type name 'pmf_qual_t' bool (*dv_class_suspend)(device_t, const pmf_qual_t *); ^ /usr/include/sys/device.h:181:44: error: unknown type name 'pmf_qual_t' bool (*dv_class_suspend)(device_t, const pmf_qual_t *); ^ /usr/include/sys/device.h:182:43: error: unknown type name 'pmf_qual_t' bool (*dv_class_resume)(device_t, const pmf_qual_t *); ^ /usr/include/sys/device.h:182:43: error: unknown type name 'pmf_qual_t' bool (*dv_class_resume)(device_t, const pmf_qual_t *); ^ /usr/include/sys/device.h:182:43: error: unknown type name 'pmf_qual_t' /usr/include/sys/device.h:182:43: error: unknown type name 'pmf_qual_t' bool (*dv_class_resume)(device_t, const pmf_qual_t *); ^ bool (*dv_class_resume)(device_t, const pmf_qual_t *); ^ /usr/include/sys/device.h:182:43: error: unknown type name 'pmf_qual_t' bool (*dv_class_resume)(device_t, const pmf_qual_t *);
Attachment:
signature.asc
Description: OpenPGP digital signature