This works for me:

diff --git a/source/Host/common/Host.cpp b/source/Host/common/Host.cpp
index 275b446..09c392b 100644
--- a/source/Host/common/Host.cpp
+++ b/source/Host/common/Host.cpp
@@ -37,6 +37,9 @@
 #include <mach/mach_init.h>
 #include <mach-o/dyld.h>
 #include <AvailabilityMacros.h>
+#ifndef CPU_SUBTYPE_X86_64_H
+#define CPU_SUBTYPE_X86_64_H ((cpu_subtype_t)8)
+#endif
 #endif

 #if defined (__linux__) || defined (__FreeBSD__) || defined
(__FreeBSD_kernel__) || defined (__APPLE__) || defined(__NetBSD__)

so just commit that? Not sure if it's all that great to have to do
this, especially because we already have all the definitions we need
in SafeMachO.h, but I guess this at least fixes the build.

On Wed, Jul 23, 2014 at 5:19 PM, Greg Clayton <[email protected]> wrote:
> The CPU is new and only available in newer system headers.
>
> Keno, please add the following code only in the Host.cpp or Host.mm (since 
> these are some of the few files in the LLDB sources that can include host 
> specific header files) for apple builds:
>
> #ifndef CPU_SUBTYPE_X86_64_H
> #define CPU_SUBTYPE_X86_64_H ((cpu_subtype_t)8)
> #endif
>
> This is usually in /usr/include/mach/machine.h, but it won't be in older 
> versions of the header.
>
>
>> On Jul 23, 2014, at 8:43 AM, Keno Fischer <[email protected]> 
>> wrote:
>>
>> While building on OS X I have been sent reports of the following (I
>> did see it myself at one point as well, but worked around it). I tried
>> including SafeMachO.h but that caused other problems in the llvm
>> headers. What's the proper way to get around this other than `#define
>> CPU_SUBTYPE_X86_64_H 8`?
>>
>> lldb/source/Host/common/Host.cpp:371:68: error: use of undeclared
>> identifier 'CPU_SUBTYPE_X86_64_H'
>>                if (cpusubtype == CPU_SUBTYPE_486 || cpusubtype ==
>> CPU_SUBTYPE_X86_64_H)
>>
>> Keno
>> _______________________________________________
>> lldb-dev mailing list
>> [email protected]
>> http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev
>
_______________________________________________
lldb-dev mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev

Reply via email to