From: Sami Kerola Date: Sun, 2 Dec 2018 16:28:22 +0000 (+0000) Subject: include/c: check returns_nonnull function attribute with __GNUC_PREREQ X-Git-Tag: v2.34-rc1~192^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3ccbdf7aa494ce854d9f346ab6bd6f51b952ff32;p=thirdparty%2Futil-linux.git include/c: check returns_nonnull function attribute with __GNUC_PREREQ Karel pointed out previous commit could have been better in github feedback, so lets use the version check macro instead of compare versions directly. Previous-commit: f1b327f8d5c8de7bf7fae99e85765d0954a25bac Reference: https://github.com/karelzak/util-linux/pull/704#issuecomment-432605211 Signed-off-by: Sami Kerola --- diff --git a/include/c.h b/include/c.h index 8b2a2d19a4..059fadf0bb 100644 --- a/include/c.h +++ b/include/c.h @@ -80,7 +80,7 @@ # endif #endif -#if (__GNUC__ >= 5) || ((__GNUC__ >= 4) && (__GNUC_MINOR__ >= 9)) +#if __GNUC_PREREQ (4, 9) # define __ul_returns_nonnull __attribute__((returns_nonnull)) #else # define __ul_returns_nonnull