Re: [PATCH] Makefile: FreeBSD cannot do C99-or-below build
- From
- Neeraj Singh <nksingh85@gmail.com>
- Date
- Jan 18, 2022, 21:47 UTC
- Message-ID
- <20220118214720.GA8652@neerajsi-x1.localdomain>
- In-Reply-To
- <xmqq1r15szpg.fsf_-_@gitster.g>
The approach of building with C11 on FreeBSD is a good one compared to trying to hack around the headers.
It appears more like a compiler bug that's being worked around here. The FreeBSD header supposedly uses a GCC extension if the C standard version is less than C11. See: https://github.com/freebsd/freebsd-src/blob/1e7b5f950b2d54ddb257d008592563c4d753aa54/sys/sys/cdefs.h#L317
Signed-off-by: Neeraj Singh <neerajsi@microsoft.com>