mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
fix for plugin mechanism on clang
This commit is contained in:
parent
7b61a71b93
commit
4af0dd6584
1 changed files with 3 additions and 1 deletions
|
@ -35,6 +35,7 @@
|
|||
|
||||
#include "nodes/cbuilder.h"
|
||||
|
||||
/** @todo This is ugly as hell and broken on OS X / Clang anyway. */
|
||||
#define REGISTER_PLUGIN(p) \
|
||||
__attribute__((constructor(110))) static void UNIQUE(__ctor)() {\
|
||||
if (plugins.state == STATE_DESTROYED) \
|
||||
|
@ -42,7 +43,8 @@ __attribute__((constructor(110))) static void UNIQUE(__ctor)() {\
|
|||
list_push(&plugins, p); \
|
||||
} \
|
||||
__attribute__((destructor(110))) static void UNIQUE(__dtor)() { \
|
||||
list_remove(&plugins, p); \
|
||||
if (plugins.state != STATE_DESTROYED) \
|
||||
list_remove(&plugins, p); \
|
||||
}
|
||||
|
||||
extern struct list plugins;
|
||||
|
|
Loading…
Add table
Reference in a new issue