Skip to content

Commit a460c92

Browse files
authored
Merge pull request #1501 from martin-frbg/issue875
Add workaround for old gcc and clang versions
2 parents 07ed01e + 01c4b82 commit a460c92

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

driver/others/memory.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,9 +147,12 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
147147
#elif (defined(OS_DARWIN) || defined(OS_SUNOS)) && defined(C_GCC)
148148
#define CONSTRUCTOR __attribute__ ((constructor))
149149
#define DESTRUCTOR __attribute__ ((destructor))
150-
#else
150+
#elif __GNUC__ && INIT_PRIORITY && ((GCC_VERSION >= 40300) || (CLANG_VERSION >= 20900))
151151
#define CONSTRUCTOR __attribute__ ((constructor(101)))
152152
#define DESTRUCTOR __attribute__ ((destructor(101)))
153+
#else
154+
#define CONSTRUCTOR __attribute__ ((constructor))
155+
#define DESTRUCTOR __attribute__ ((destructor))
153156
#endif
154157

155158
#ifdef DYNAMIC_ARCH

0 commit comments

Comments
 (0)