Skip to content

Commit

Permalink
Fix compilation with 17.4 sdk (Closes #516)
Browse files Browse the repository at this point in the history
  • Loading branch information
opa334 committed Mar 26, 2024
1 parent 9e7d81e commit df49257
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 3 deletions.
4 changes: 4 additions & 0 deletions BaseBin/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,10 @@ rootlesshooks: .build .include
rm -rf .include
mkdir -p .include
cp -r _external/include/* .include
# If the SDK already ships XPC (it does so in iOS 17.4+), remove the local copy of it
ifneq (,$(wildcard $(shell xcrun --sdk iphoneos --show-sdk-path)/usr/include/xpc.modulemap))
rm -rf .include/xpc
endif

basebin.tc: subprojects
trustcache create .build/basebin.tc .build
Expand Down
7 changes: 6 additions & 1 deletion BaseBin/_external/include/sandbox.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#ifndef __SANDBOX_H__
#define __SANDBOX_H__

#include <mach/mach.h>
#include <stdlib.h>

Expand Down Expand Up @@ -115,4 +118,6 @@ int sandbox_extension_release(int64_t extension_handle);
int sandbox_extension_release_file(int64_t extension_handle, const char *path);
int sandbox_extension_update_file(int64_t extension_handle, const char *path);

int __sandbox_ms(const char *policyname, int call, void *arg);
int __sandbox_ms(const char *policyname, int call, void *arg);

#endif
1 change: 0 additions & 1 deletion BaseBin/_external/include/xpc/xpc.h
Original file line number Diff line number Diff line change
Expand Up @@ -2732,5 +2732,4 @@ xpc_set_event_stream_handler(const char *stream,
__END_DECLS
XPC_ASSUME_NONNULL_END

#include <xpc/private.h>
#endif // __XPC_H__
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#ifndef __XPC_PRIVATE_H__
#define __XPC_PRIVATE_H__

void xpc_dictionary_get_audit_token(xpc_object_t xdict, audit_token_t *token);
char *xpc_strerror (int);

Expand All @@ -8,4 +11,6 @@ extern int xpc_pipe_routine_with_flags(xpc_object_t xpc_pipe, xpc_object_t inDic
extern int xpc_pipe_routine_reply(xpc_object_t reply);
extern int xpc_pipe_receive(mach_port_t port, XPC_GIVES_REFERENCE xpc_object_t *message);

extern XPC_RETURNS_RETAINED xpc_object_t xpc_copy_entitlement_for_token(const char *, audit_token_t *);
extern XPC_RETURNS_RETAINED xpc_object_t xpc_copy_entitlement_for_token(const char *, audit_token_t *);

#endif
1 change: 1 addition & 0 deletions BaseBin/libjailbreak/src/jbclient_xpc.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#define JBCLIENT_XPC_H

#include <xpc/xpc.h>
#include <xpc_private.h>
#include <stdint.h>

void jbclient_xpc_set_custom_port(mach_port_t serverPort);
Expand Down
1 change: 1 addition & 0 deletions BaseBin/libjailbreak/src/jbserver.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#include <stdbool.h>
#include <stdint.h>
#include <xpc/xpc.h>
#include <xpc_private.h>

typedef enum {
JBS_TYPE_BOOL,
Expand Down

0 comments on commit df49257

Please sign in to comment.