Skip to content

Commit

Permalink
win: windows do not support __attribute__
Browse files Browse the repository at this point in the history
  • Loading branch information
mchalupa committed Nov 22, 2024
1 parent 07d53c2 commit b9b53a9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/utility.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@

namespace {

#ifdef __linux__
static inline void _fail(const char *file, int line, const char *func, const char* text) __attribute__((noreturn));
#else
__declspec(noreturn)
#endif
static inline void _fail(const char *file, int line, const char *func, const char* text) {
fprintf(stderr, "Failure: %s\n", text);
fprintf(stderr, "File: %s\n", file);
Expand Down

0 comments on commit b9b53a9

Please sign in to comment.