]> git.saurik.com Git - apple/libc.git/blobdiff - stdio/FreeBSD/vfprintf.c
Libc-1439.100.3.tar.gz
[apple/libc.git] / stdio / FreeBSD / vfprintf.c
index dd2bcfee465925dd1366bc252c8e8ffbc347132b..cf5104506df93638cee04ff3458c85d897143436 100644 (file)
 #pragma clang diagnostic push
 #pragma clang diagnostic ignored "-Wint-conversion"
 
+#include <TargetConditionals.h>
+#if !TARGET_OS_DRIVERKIT
 #define OS_CRASH_ENABLE_EXPERIMENTAL_LIBTRACE 1
+#endif
 
 #if defined(LIBC_SCCS) && !defined(lint)
 static char sccsid[] = "@(#)vfprintf.c 8.1 (Berkeley) 6/4/93";
@@ -873,7 +876,11 @@ fp_common:
                                static_format_checked = __printf_is_memory_read_only((void*)fmt0, strlen(fmt0));
                        }
                        if (!static_format_checked) {
+#if OS_CRASH_ENABLE_EXPERIMENTAL_LIBTRACE
                                os_crash("%%n used in a non-immutable format string: %s", fmt0);
+#else
+                               os_crash("%%n used in a non-immutable format string");
+#endif
                        }
 #endif // ALLOW_DYNAMIC_PERCENT_N