From 4792258fd0b2dc7ac89d98b270e10264c5491e82 Mon Sep 17 00:00:00 2001 From: Yifan Lu Date: Tue, 4 Oct 2016 19:51:51 -0700 Subject: 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 --- lib/substitute.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'lib/substitute.h') 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 @@ -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 -- cgit v1.2.3