diff options
| author | louist103 <louist103@gmail.com> | 2022-07-26 16:04:08 -0400 |
|---|---|---|
| committer | Nicholas Estelami <NEstelami@users.noreply.github.com> | 2022-07-30 22:18:11 -0400 |
| commit | f3d1ac2f07b38a17d2ce3d5ede72f92b632298a5 (patch) | |
| tree | 8e3068af9d361db18ed7d21f662b8b2303a8cfd7 /ZAPD/CrashHandler.h | |
| parent | 497bf79892c9ad6166f247be0f14ced632523b79 (diff) | |
Check for POSIX instead of just linux
Diffstat (limited to 'ZAPD/CrashHandler.h')
| -rw-r--r-- | ZAPD/CrashHandler.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/ZAPD/CrashHandler.h b/ZAPD/CrashHandler.h index 9bb3f5b..6354be4 100644 --- a/ZAPD/CrashHandler.h +++ b/ZAPD/CrashHandler.h @@ -1,10 +1,17 @@ +#if __has_include(<unistd.h>) +#define HAS_POSIX 1 +#else +#define HAS_POSIX 0 +#endif + + #include <array> #include <csignal> #include <cstdio> #include <cstdlib> #include <ctime> -#if defined(__linux__) +#if HAS_POSIX == 1 #include <cxxabi.h> // for __cxa_demangle #include <dlfcn.h> // for dladdr #include <execinfo.h> |
