Index: include/lldb/Host/HostGetOpt.h
===================================================================
--- include/lldb/Host/HostGetOpt.h	(revision 203501)
+++ include/lldb/Host/HostGetOpt.h	(working copy)
@@ -10,6 +10,10 @@
 
 #ifndef _MSC_VER
 
+#ifdef _WIN32
+#define _BSD_SOURCE // Required so that getopt.h defines optreset
+#endif
+
 #include <unistd.h>
 #include <getopt.h>
 
Index: source/Host/common/OptionParser.cpp
===================================================================
--- source/Host/common/OptionParser.cpp	(revision 203501)
+++ source/Host/common/OptionParser.cpp	(working copy)
@@ -8,10 +8,6 @@
 //===----------------------------------------------------------------------===//
 
 #include "lldb/Host/OptionParser.h"
-
-#if (!defined( _MSC_VER ) && defined( _WIN32 ))
-#define _BSD_SOURCE // Required so that getopt.h defines optreset
-#endif
 #include "lldb/Host/HostGetOpt.h"
 
 using namespace lldb_private;
