Index: lldb/include/lldb/Host/common/GetOptInc.h =================================================================== --- lldb/include/lldb/Host/common/GetOptInc.h +++ lldb/include/lldb/Host/common/GetOptInc.h @@ -15,7 +15,7 @@ #define REPLACE_GETOPT #define REPLACE_GETOPT_LONG #endif -#if defined(_MSC_VER) || defined(__NetBSD__) +#if defined(_MSC_VER) || defined(__NetBSD__) || defined(__APPLE__) #define REPLACE_GETOPT_LONG_ONLY #endif Index: lldb/source/Host/common/OptionParser.cpp =================================================================== --- lldb/source/Host/common/OptionParser.cpp +++ lldb/source/Host/common/OptionParser.cpp @@ -10,7 +10,7 @@ #include "lldb/Host/HostGetOpt.h" #include "lldb/Utility/OptionDefinition.h" #include "lldb/lldb-private-types.h" - +#include "lldb/Host/common/GetOptInc.h" #include using namespace lldb_private; Index: lldb/tools/lldb-server/lldb-platform.cpp =================================================================== --- lldb/tools/lldb-server/lldb-platform.cpp +++ lldb/tools/lldb-server/lldb-platform.cpp @@ -36,6 +36,7 @@ #include "lldb/Host/common/TCPSocket.h" #include "lldb/Utility/FileSpec.h" #include "lldb/Utility/Status.h" +#include "lldb/Host/common/GetOptInc.h" using namespace lldb; using namespace lldb_private;