]> git.cameronkatri.com Git - snaprestore.git/commitdiff
Don't use an include directory
authorCameron Katri <me@cameronkatri.com>
Tue, 8 Dec 2020 00:26:29 +0000 (19:26 -0500)
committerCameron Katri <me@cameronkatri.com>
Tue, 8 Dec 2020 00:26:29 +0000 (19:26 -0500)
Makefile
include/IOKit [deleted symlink]
include/libkern [deleted symlink]
src/snaprestore.m

index a6255fb5d167be236881eaac84223ff285af6d39..8a062565a1c4cf6ccce7ed5c038739c362f47ecb 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
 CC              ?= aarch64-apple-darwin-clang
 STRIP           ?= aarch64-apple-darwin-strip
 LDID            ?= ldid
-CFLAGS          ?= -arch arm64  -isysroot /home/cameron/Documents/SDK/iPhoneOS14.2.sdk -miphoneos-version-min=13.0 -Iinclude
+CFLAGS          ?= -arch arm64  -isysroot /home/cameron/Documents/SDK/iPhoneOS14.2.sdk -miphoneos-version-min=13.0
 INSTALL         ?= install
 FAKEROOT        ?= fakeroot
 PREFIX          ?= /usr
@@ -16,7 +16,7 @@ all: build/snaprestore
 
 build/snaprestore: src/snaprestore.m src/ent.xml
        mkdir -p build
-       $(CC) $(CFLAGS) -o build/snaprestore src/snaprestore.m -framework IOKit -framework Foundation -framework MobileCoreServices -fobjc-arc
+       $(CC) $(CFLAGS) -o build/snaprestore src/snaprestore.m -framework IOKit -framework Foundation -framework CoreServices -fobjc-arc
        $(STRIP) build/snaprestore
        $(LDID) -Ssrc/ent.xml build/snaprestore
 
diff --git a/include/IOKit b/include/IOKit
deleted file mode 120000 (symlink)
index 0900dbf..0000000
+++ /dev/null
@@ -1 +0,0 @@
-/home/cameron/Documents/SDK/MacOSX11.0.sdk/System/Library/Frameworks/IOKit.framework/Headers
\ No newline at end of file
diff --git a/include/libkern b/include/libkern
deleted file mode 120000 (symlink)
index a19ad08..0000000
+++ /dev/null
@@ -1 +0,0 @@
-/home/cameron/Documents/SDK/MacOSX11.0.sdk/usr/include/libkern
\ No newline at end of file
index deda1bc55916e39dafd80e27bedefaa2ba095273..23b20c8dacd3196900cb4a21ffd959546bc90e6a 100644 (file)
@@ -1,9 +1,15 @@
 #import <Foundation/Foundation.h>
 #import <Foundation/NSFileManager.h>
-#import <IOKit/IOKitLib.h>
 #import <sys/snapshot.h>
 #import <getopt.h>
 
+typedef char io_string_t[512];
+typedef mach_port_t io_object_t;
+typedef io_object_t io_registry_entry_t;
+io_registry_entry_t IORegistryEntryFromPath(mach_port_t master, const io_string_t path);
+CFTypeRef IORegistryEntryCreateCFProperty(io_registry_entry_t entry, CFStringRef key, CFAllocatorRef allocator, uint32_t options);
+kern_return_t IOObjectRelease(io_object_t object);
+
 @interface LSApplicationWorkspace : NSObject
 + (id)defaultWorkspace;
 - (BOOL)_LSPrivateRebuildApplicationDatabasesForSystemApps:(BOOL)arg1 internal:(BOOL)arg2 user:(BOOL)arg3;