Skip to content

Commit 130802b

Browse files
author
Tamas Berghammer
committedJul 7, 2016
Try to fix the OSX build with old SDK after r274725
llvm-svn: 274743
1 parent 575f2bb commit 130802b

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed
 

‎lldb/tools/debugserver/source/MacOSX/MachProcess.mm

+12-2
Original file line numberDiff line numberDiff line change
@@ -631,8 +631,14 @@
631631
if (ReadMemory (load_cmds_p, sizeof (struct uuid_command), &uuidcmd) == sizeof (struct uuid_command))
632632
uuid_copy (inf.uuid, uuidcmd.uuid);
633633
}
634-
if (lc.cmd == LC_VERSION_MIN_IPHONEOS || lc.cmd == LC_VERSION_MIN_MACOSX
635-
|| lc.cmd == LC_VERSION_MIN_WATCHOS || lc.cmd == LC_VERSION_MIN_TVOS)
634+
bool lc_cmd_known = lc.cmd == LC_VERSION_MIN_IPHONEOS || lc.cmd == LC_VERSION_MIN_MACOSX;
635+
#if defined(LC_VERSION_MIN_TVOS)
636+
lc_cmd_known |= lc.cmd == LC_VERSION_MIN_TVOS;
637+
#endif
638+
#if defined(LC_VERSION_MIN_WATCHOS)
639+
lc_cmd_known |= lc.cmd == LC_VERSION_MIN_WATCHOS;
640+
#endif
641+
if (lc_cmd_known)
636642
{
637643
struct version_min_command vers_cmd;
638644
if (ReadMemory (load_cmds_p, sizeof (struct version_min_command), &vers_cmd) != sizeof (struct version_min_command))
@@ -647,12 +653,16 @@
647653
case LC_VERSION_MIN_MACOSX:
648654
inf.min_version_os_name = "macosx";
649655
break;
656+
#if defined(LC_VERSION_MIN_TVOS)
650657
case LC_VERSION_MIN_TVOS:
651658
inf.min_version_os_name = "tvos";
652659
break;
660+
#endif
661+
#if defined(LC_VERSION_MIN_WATCHOS)
653662
case LC_VERSION_MIN_WATCHOS:
654663
inf.min_version_os_name = "watchos";
655664
break;
665+
#endif
656666
default:
657667
return false;
658668
}

0 commit comments

Comments
 (0)