mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-23 05:42:29 +00:00
Fix --strace crashing on MacOS and Windows
This commit is contained in:
parent
651826b660
commit
eb69a42863
1 changed files with 3 additions and 2 deletions
|
@ -19,11 +19,12 @@
|
||||||
#include "libc/intrin/kprintf.h"
|
#include "libc/intrin/kprintf.h"
|
||||||
#include "libc/intrin/strace.internal.h"
|
#include "libc/intrin/strace.internal.h"
|
||||||
#include "libc/runtime/runtime.h"
|
#include "libc/runtime/runtime.h"
|
||||||
#include "libc/thread/tls.h"
|
#include "libc/thread/tls2.h"
|
||||||
|
|
||||||
privileged void __stracef(const char *fmt, ...) {
|
privileged void __stracef(const char *fmt, ...) {
|
||||||
va_list v;
|
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;
|
return;
|
||||||
}
|
}
|
||||||
va_start(v, fmt);
|
va_start(v, fmt);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue