Skip to content
Unverified Commit f70b229e authored by Martin Storsjö's avatar Martin Storsjö Committed by GitHub
Browse files

[LLDB] Define _BSD_SOURCE globally, to get optreset available in mingw's getopt.h (#76137)

We previously were defining _BSD_SOURCE right before including getopt.h.
However, on mingw-w64, getopt.h is also transitively included by
unistd.h, and unistd.h can be transitively included by many headers
(recently, by some libc++ headers).

Therefore, to be safe, we need to define _BSD_SOURCE before including
any header. Thus do this in CMake.

This fixes https://github.com/llvm/llvm-project/issues/76050.
parent e64f5d63
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment