]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
include/c: check returns_nonnull function attribute with __GNUC_PREREQ
authorSami Kerola <kerolasa@iki.fi>
Sun, 2 Dec 2018 16:28:22 +0000 (16:28 +0000)
committerSami Kerola <kerolasa@iki.fi>
Sun, 2 Dec 2018 16:28:22 +0000 (16:28 +0000)
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 <kerolasa@iki.fi>
include/c.h

index 8b2a2d19a40203956222245e61a46987e9e3d38b..059fadf0bb0216148fa562e695f555190d1158d2 100644 (file)
@@ -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