Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sys/cpuset.h must be included after sys/param.h (FreeBSD) #99

Merged
merged 1 commit into from
Jul 13, 2021
Merged

sys/cpuset.h must be included after sys/param.h (FreeBSD) #99

merged 1 commit into from
Jul 13, 2021

Conversation

leres
Copy link
Contributor

@leres leres commented Jul 12, 2021

According to the cpuset(2) man page, sys/param.h must be included before sys/cpuset.h. This was fixed in May of 2020 (bac1f23) and undone in August of 2020 (9490b14).

Here's a log showing the compile errors under FreeBSD 14.0-CURRENT:

http://beefy18.nyi.freebsd.org/data/main-amd64-default/pf44e1c1de734_s63ca9ea4f3/logs/zeek-4.0.3.log

Fix the order again. While we're here add a comment and disable clang-format for these includes.

Thanks to @skand888 for analyzing the FreeBSD build failure which brought me here.

before sys/cpuset.h. This was fixed in May of 2020 (bac1f23) and
undone in August of 2020 (9490b14).

Here's a log showing the compile errors under FreeBSD 14.0-CURRENT:

    http://beefy18.nyi.freebsd.org/data/main-amd64-default/pf44e1c1de734_s63ca9ea4f3/logs/zeek-4.0.3.log

Fix the order again. While we're here add a comment and disable
clang-format for these includes.

Thanks to @skand888 for analyzing the FreeBSD build failure which
brought me here.
@google-cla
Copy link

google-cla bot commented Jul 12, 2021

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

@leres
Copy link
Contributor Author

leres commented Jul 12, 2021

@googlebot I signed it!

@google-cla google-cla bot added cla: yes and removed cla: no labels Jul 12, 2021
@jan-wassenberg
Copy link
Member

Thanks for fixing this permanently, clang-format reordering of headers is dangerous

@jan-wassenberg jan-wassenberg merged commit 2361494 into google:master Jul 13, 2021
@leres leres deleted the update branch July 13, 2021 19:34
leres added a commit to leres/highwayhash that referenced this pull request Jul 20, 2021
According to the sysctl(3) man page, sys/types.h must be included
before sys/sysctl.h. This is another casualty of the August of 2020
(9490b14) autoformatter update.

As with google#99, add a comment
and disable clang-format for these includes.
leres added a commit to leres/highwayhash that referenced this pull request Jul 20, 2021
According to the sysctl(3) man page, sys/types.h must be included
before sys/sysctl.h. This is another casualty of the August of 2020
(9490b14) autoformatter update.

Here's the compile error (powerpc64*) from the commit that patched
the FreeBSD security/zeek port:

    In file included from /wrkdirs/usr/ports/security/zeek/work/zeek-4.0.3/auxil/highwayhash/highwayhash/arch_specific.cc:27:
    /usr/include/sys/sysctl.h:1185:25: error: unknown type name 'u_int'
    int     sysctl(const int *, u_int, void *, size_t *, const void *, size_t);

As with google#99, add a comment
and disable clang-format for these includes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants