Re: Did something change with sys/cpuset.h in CURRENT?

From: Craig Leres <leres_at_freebsd.org>
Date: Sun, 11 Jul 2021 19:08:00 -0700
On 7/11/21 3:19 PM, Sergey Kandaurov wrote:
> In zeek-4.0.3 (to which the port was recently updated from 4.0.2)
> the header inclusion order has changed; the relevant diff:
> 
>   #ifdef __FreeBSD__
>   #define OS_FREEBSD 1
> -#include <sys/param.h>
>   #include <sys/cpuset.h>
> +#include <sys/param.h>
>   #include <unistd.h>
>   #else
>   #define OS_FREEBSD 0
> 
> - sys/cpuset.h requires sys/types.h to define cpusetid_t (and friends),
> - sys/params.h includes sys/types.h
> 
>    this is documented in cpuset(2)
> 
> This works on stable versions such as FreeBSD 13.0 w/ clang 11.0.1, though.
> This is seemingly due to a header pollution fixed in llvmorg-12 import.
> Before that, sys/types were included indirectly with #include <random>:
> random -> istream -> ostream -> locale -> nl_types.h -> sys/types.h
> With llvmorg-12 import, istream / ostream are replaced with iosfwd.

Wow, you certainly wasted no time zero'ing in on the issue; thanks! I 
submitted an upstream pull request:

     https://github.com/zeek/highwayhash/pull/1

(I also ping'ed a contact to help insure the fix gets into the next 
release) and have patched security/zeek.

I feel obligated at this point to mention I'm rarely if ever 
disappointed when I post a question to freebsd-hackers.

		Craig
Received on Mon Jul 12 2021 - 02:08:00 UTC

Original text of this message