Defined and use _write

This commit is contained in:
akallabeth 2022-04-29 13:34:39 +02:00 committed by akallabeth
parent 00b00ea521
commit 9330559d24
2 changed files with 9 additions and 1 deletions

View File

@ -31,6 +31,12 @@
#ifndef _WIN32
#include <unistd.h>
#ifndef _write
#define _write write
#endif
#ifndef _strtoui64
#define _strtoui64 strtoull
#endif

View File

@ -22,6 +22,8 @@
#include <stdio.h>
#include <fcntl.h>
#include <winpr/crt.h>
#include <winpr/string.h>
#if defined(HAVE_EXECINFO_H)
@ -161,7 +163,7 @@ void winpr_backtrace_symbols_fd(void* buffer, int fd)
return;
for (i = 0; i < used; i++)
write(fd, lines[i], (unsigned)strnlen(lines[i], UINT32_MAX));
_write(fd, lines[i], (unsigned)strnlen(lines[i], UINT32_MAX));
}
#else
LOGF(support_msg);