X-Git-Url: https://git.saurik.com/apple/libc.git/blobdiff_plain/70ad1dc8a19d6edd9b97aa81f32cfd65758ae97d..refs/heads/master:/stdio/FreeBSD/vfprintf.c?ds=sidebyside diff --git a/stdio/FreeBSD/vfprintf.c b/stdio/FreeBSD/vfprintf.c index dd2bcfe..cf51045 100644 --- a/stdio/FreeBSD/vfprintf.c +++ b/stdio/FreeBSD/vfprintf.c @@ -33,7 +33,10 @@ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wint-conversion" +#include +#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