From d52241cfc8b1e1a5ed602fedfe9d11b4653c96cf Mon Sep 17 00:00:00 2001 From: comex Date: Mon, 13 Jul 2015 17:08:55 -0400 Subject: hook up the list of dylibs --- lib/substitute-internal.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'lib/substitute-internal.h') diff --git a/lib/substitute-internal.h b/lib/substitute-internal.h index 80c8b22..675f6eb 100644 --- a/lib/substitute-internal.h +++ b/lib/substitute-internal.h @@ -1,6 +1,8 @@ #pragma once #include +#include + #define substitute_panic(...) do { \ fprintf(stderr, __VA_ARGS__); \ abort(); \ @@ -100,3 +102,8 @@ int substitute_dlopen_in_pid(int pid, const char *filename, int options, int substitute_ios_unrestrict(task_t task, char **error); #endif +static const char *xbasename(const char *path) { + const char *slash = strrchr(path, '/'); + return slash ? slash + 1 : path; +} + -- cgit v1.2.3