[ox/std] Fix __has_include logic
This commit is contained in:
parent
8c576ef9c5
commit
9187bcf62b
4
deps/ox/src/ox/std/stacktrace.cpp
vendored
4
deps/ox/src/ox/std/stacktrace.cpp
vendored
@ -6,7 +6,7 @@
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
#if defined(OX_USE_STDLIB)
|
||||
#if defined(OX_USE_STDLIB) && __has_include(<unistd.h>)
|
||||
#include <array>
|
||||
#include <execinfo.h>
|
||||
#include <iostream>
|
||||
@ -18,7 +18,7 @@
|
||||
namespace ox {
|
||||
|
||||
void printStackTrace([[maybe_unused]]int shave) {
|
||||
#if defined(OX_USE_STDLIB)
|
||||
#if defined(OX_USE_STDLIB) && __has_include(<unistd.h>)
|
||||
std::array<void*, 100> frames;
|
||||
auto size = static_cast<int>(backtrace(frames.data(), frames.size()));
|
||||
if (size > shave) {
|
||||
|
2
deps/ox/src/ox/std/trace.cpp
vendored
2
deps/ox/src/ox/std/trace.cpp
vendored
@ -15,8 +15,6 @@
|
||||
|
||||
#include "trace.hpp"
|
||||
|
||||
int counter = 0;
|
||||
|
||||
extern "C"
|
||||
void oxTraceHook([[maybe_unused]] const char *file, [[maybe_unused]] int line,
|
||||
[[maybe_unused]] const char *ch, [[maybe_unused]] const char *msg) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user