HomeFreeBSD

Revert "Fix cross-build support for Ubuntu 16.04"

Description

Revert "Fix cross-build support for Ubuntu 16.04"

This reverts commit d6327ae8c11b73765f100981baca49166b558b70.

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: https://github.com/freebsd/freebsd-src/pull/668

Details

Provenance
jlduranAuthored on Mar 2 2023, 3:31 PM
impCommitted on Mar 7 2023, 11:11 PM
Parents
rG0eabe33087d8: Updates to UFS/FFS superblock integrity checks when reading a superblock.
Branches
Unknown
Tags
Unknown
Reverts
rGd6327ae8c11b: Fix cross-build support for Ubuntu 16.04