diff --git a/src/util.c b/src/util.c index b8c2bc0..7d1bbd3 100644 --- a/src/util.c +++ b/src/util.c @@ -6,9 +6,15 @@ #include #include +#ifndef _MSC_VER +#define WEAK __attribute__((weak)) +#else +#define WEAK +#endif + // Default implementation for minitar_handle_panic(). Since it's declared weak, any other definition will silently // override this one :) -__attribute__((weak)) noreturn void minitar_handle_panic(const char* message) +WEAK noreturn void minitar_handle_panic(const char* message) { fprintf(stderr, "minitar: %s\n", message); abort();