diff options
author | Yifan Lu | 2016-10-04 19:51:51 -0700 |
---|---|---|
committer | Yifan Lu | 2016-10-04 19:51:51 -0700 |
commit | 4792258fd0b2dc7ac89d98b270e10264c5491e82 (patch) | |
tree | 54a44b939fb8f815f920bde71aa0b9223a2a842e /lib/substitute.h | |
parent | make ln command more robust (diff) | |
download | substitute-4792258fd0b2dc7ac89d98b270e10264c5491e82.tar.gz |
Added option to removed pthread dependency
Added option to remove dynamic linker stuff
Fixed a reference in strerror.c that depends on __APPLE__ being defined
Diffstat (limited to '')
-rw-r--r-- | lib/substitute.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/substitute.h b/lib/substitute.h index 72c3919..d3af586 100644 --- a/lib/substitute.h +++ b/lib/substitute.h @@ -101,9 +101,11 @@ struct substitute_function_hook { }; /* substitute_hook_functions options */ +#ifndef NO_PTHREADS enum { SUBSTITUTE_NO_THREAD_SAFETY = 1, }; +#endif /* Patch the machine code of the specified functions to redirect them to the * specified replacements. @@ -153,7 +155,7 @@ int substitute_hook_functions(const struct substitute_function_hook *hooks, struct substitute_function_hook_record **recordp, int options); -#if 1 /* declare dynamic linker-related stuff? */ +#ifndef NO_DYNAMIC_LINKER_STUFF /* declare dynamic linker-related stuff? */ #ifdef __APPLE__ #include <mach-o/nlist.h> @@ -271,7 +273,7 @@ int substitute_interpose_imports(const struct substitute_image *handle, int options); -#endif /* 1 */ +#endif /* NO_DYNAMIC_LINKER_STUFF */ #if defined(__APPLE__) #include <objc/runtime.h> |