From 574cea670800e402c9c8325b159aa4361b645566 Mon Sep 17 00:00:00 2001 From: Gregory Pakosz Date: Tue, 23 Feb 2016 11:27:29 +0100 Subject: [PATCH] fixed double load/unload in example/example.library.c when building with MinGW case by both __GNUC__ and _WIN32 preprocessor definitions being defined at the same time --- example/library.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/example/library.c b/example/library.c index 808a2a4..cd5f0dd 100644 --- a/example/library.c +++ b/example/library.c @@ -3,7 +3,7 @@ #include -#if defined(__GNUC__) +#if defined(__GNUC__) && !defined(_WIN32) __attribute__((constructor)) #endif static void load() @@ -42,7 +42,8 @@ static void load() } } -#if defined(__GNUC__) +#if defined(__GNUC__) && !defined(_WIN32) +__attribute__((constructor)) __attribute__((destructor)) #endif static void unload()