Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "Fix cross-build support for Ubuntu 16.04"
This reverts commit d6327ae. Before version 2.25, glibc's unistd.h would define the POSIX subset of getopt.h by defining __need_getopt, including getopt.h (which would disable the header guard) and then undefining it so later including getopt.h explicitly would define the extensions. However, we wrap getopt, and so the wrapper's #pragma once breaks that. Thus getopt.h was included before the real unistd.h to ensure we get all the extensions. However, with clang 12 that causes problems where we get a function mismatch (since getopt can throw exceptions). If we include it after unistd.h, it will get the full definitions since glibc no longer does the subsetting thing. This will result in matching definitions and fix clang 12. Reviewed by: imp, jrtc27 (OK'd on irc) Pull Request: freebsd/freebsd-src#668
- Loading branch information