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

Fix GNU HURD sched_setaffinity compile (GH #82)#83

Merged
merged 1 commit into from Mar 20, 2020
Merged

Fix GNU HURD sched_setaffinity compile (GH #82) #83

merged 1 commit into from Mar 20, 2020

Conversation

noloader
Copy link
Contributor

@noloader noloader commented Mar 20, 2020

This PR fixes GNU HURD compiles due to sched_setaffinity.

GNU HURD was failing compiles due to detection of sched_setaffinity. HURD needs _GNU_SOURCE defined, and then needs <sched.h> included for the proper definition of cpuset_t. As such, it needed a custom AC_COMPILE_IFELSE test.

We cannot perform AC_LINK_IFELSE. See the Issue 82 report for the link warning that could cause mis-detection of sched_setaffinity.

There was a lot of trailing whitespace in the files, so configure.ac also got sed -i -e's/[[:space:]]*$//' configure.ac to trim it.

Also see Issue 82, util.c:1190: warning: sched_setaffinity is not implemented and will always fail.

@noloader noloader changed the title Fix GNU HURD compile (GH #82) Fix GNU HURD sched_setaffinity compile (GH #82) Mar 20, 2020
Copy link
Member

@wcawijngaards wcawijngaards left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the pr, looks good otherwise from a fixup.

configure.ac Show resolved Hide resolved
@wcawijngaards wcawijngaards merged commit 6590ea6 into NLnetLabs:master Mar 20, 2020
wcawijngaards added a commit that referenced this pull request Mar 20, 2020
@wcawijngaards
Copy link
Member

Thanks! I merged and fixed the review comment. I don't think we have previous test for GNU Herd, but it is nice to have support.

@noloader noloader deleted the hurd branch March 20, 2020 14:17
@noloader
Copy link
Contributor Author

noloader commented Mar 20, 2020

I don't think we have previous test for GNU Herd, but it is nice to have support.

Yeah, I'm a big fan of "it just works". Users expect to clone/upack, then /configure && make && make check && sudo make install. Anything else just annoys them and generates bug reports and mailing list messages.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants