mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
ssp: further refine the conditional used for constructor priority
__has_attribute(__constructor__) is a better test for clang than defined(__clang__). Switch to it instead. While we're already here and touching it, pfg@ nailed down when GCC actually introduced the priority argument -- 4.3. Use that instead of our hammer-guess of GCC >= 5 for the sake of correctness.
This commit is contained in:
parent
301b49d2e5
commit
4e0706cbdf
1 changed files with 1 additions and 1 deletions
|
|
@ -50,7 +50,7 @@ __FBSDID("$FreeBSD$");
|
|||
*
|
||||
* This conditional should be removed when GCC 4.2 is removed.
|
||||
*/
|
||||
#if defined(__clang__) || (defined(__GNUC__) && __GNUC__ > 4)
|
||||
#if __has_attribute(__constructor__) || __GNUC_PREREQ__(4, 3)
|
||||
#define _GUARD_SETUP_CTOR_ATTR \
|
||||
__attribute__((__constructor__ (200), __used__));
|
||||
#else
|
||||
|
|
|
|||
Loading…
Reference in a new issue