]> git.saurik.com Git - apple/xnu.git/blobdiff - libkern/kxld/kxld_versionmin.c
xnu-3789.70.16.tar.gz
[apple/xnu.git] / libkern / kxld / kxld_versionmin.c
index 9b4753c4b6a72f836532fe7c30422db62969ee7f..abbfaed6a55a70a19fc8555b79236f3d3a4252fa 100644 (file)
@@ -42,7 +42,7 @@ kxld_versionmin_init_from_macho(KXLDversionmin *versionmin, struct version_min_c
 {
     check(versionmin);
     check(src);
-    check((src->cmd == LC_VERSION_MIN_MACOSX) || (src->cmd == LC_VERSION_MIN_IPHONEOS));
+    check((src->cmd == LC_VERSION_MIN_MACOSX) || (src->cmd == LC_VERSION_MIN_IPHONEOS) || (src->cmd == LC_VERSION_MIN_TVOS) || (src->cmd == LC_VERSION_MIN_WATCHOS));
 
     switch (src->cmd) {
         case LC_VERSION_MIN_MACOSX:
@@ -51,6 +51,12 @@ kxld_versionmin_init_from_macho(KXLDversionmin *versionmin, struct version_min_c
         case LC_VERSION_MIN_IPHONEOS:
             versionmin->platform = kKxldVersionMiniPhoneOS;
             break;
+        case LC_VERSION_MIN_TVOS:
+            versionmin->platform = kKxldVersionMinAppleTVOS;
+            break;
+        case LC_VERSION_MIN_WATCHOS:
+            versionmin->platform = kKxldVersionMinWatchOS;
+            break;
     }
 
     versionmin->version = src->version;
@@ -99,6 +105,12 @@ kxld_versionmin_export_macho(const KXLDversionmin *versionmin, u_char *buf,
         case kKxldVersionMiniPhoneOS:
             versionminhdr->cmd = LC_VERSION_MIN_IPHONEOS;
             break;
+        case kKxldVersionMinAppleTVOS:
+            versionminhdr->cmd = LC_VERSION_MIN_TVOS;
+            break;
+        case kKxldVersionMinWatchOS:
+            versionminhdr->cmd = LC_VERSION_MIN_WATCHOS;
+            break;
     }
     versionminhdr->cmdsize = (uint32_t) sizeof(*versionminhdr);
     versionminhdr->version = versionmin->version;
@@ -107,6 +119,6 @@ kxld_versionmin_export_macho(const KXLDversionmin *versionmin, u_char *buf,
     rval = KERN_SUCCESS;
 
 finish:
-    return rval;
+   return rval;
 }