Fix --strace crashing on MacOS and Windows

This commit is contained in:
Justine Tunney 2023-01-04 06:46:37 -08:00
parent 651826b660
commit eb69a42863
No known key found for this signature in database
GPG key ID: BE714B4575D6E328

View file

@ -19,11 +19,12 @@
#include "libc/intrin/kprintf.h"
#include "libc/intrin/strace.internal.h"
#include "libc/runtime/runtime.h"
#include "libc/thread/tls.h"
#include "libc/thread/tls2.h"
privileged void __stracef(const char *fmt, ...) {
va_list v;
if (__strace <= 0 || (__tls_enabled && __get_tls()->tib_strace <= 0)) {
if (__strace <= 0 ||
(__tls_enabled && __get_tls_privileged()->tib_strace <= 0)) {
return;
}
va_start(v, fmt);