]> git.saurik.com Git - apple/libc.git/blobdiff - sys/_libc_fork_child.c
Libc-1439.100.3.tar.gz
[apple/libc.git] / sys / _libc_fork_child.c
index 7925da8ee15b532e2eb78419860e55fe22981652..e6c2b5756ddcdca0b78abd56e640998647e10456 100644 (file)
  * _libc_fork_child() is called from Libsystem's libSystem_atfork_child()
  */
 #include <TargetConditionals.h>
-#include "CrashReporterClient.h"
+#if __has_include(<CrashReporterClient.h>)
+#include <CrashReporterClient.h>
+#else
+#define CRSetCrashLogMessage(...)
+#endif
+
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wstrict-prototypes"
 
 extern void _arc4_fork_child();
-#if !TARGET_IPHONE_SIMULATOR
 extern void _init_clock_port(void);
-#endif
-extern void _dirhelper_fork_child(void);
+extern void __environ_lock_fork_child();
 
 void _libc_fork_child(void); // todo: private_extern?
 void
@@ -39,8 +44,7 @@ _libc_fork_child(void)
        CRSetCrashLogMessage("crashed on child side of fork pre-exec");
 
        _arc4_fork_child();
-#if !TARGET_IPHONE_SIMULATOR
        _init_clock_port();
-#endif
-       _dirhelper_fork_child();
+       __environ_lock_fork_child();
 }
+#pragma clang diagnostic pop