diff options
| author | Alex Burmashev <alexander.burmashev@oracle.com> | 2021-03-10 08:49:54 -0500 |
|---|---|---|
| committer | Peter Jones <pjones@redhat.com> | 2021-03-10 16:41:32 -0500 |
| commit | 4033d1fd0f25196f9a35e944679676277cd51960 (patch) | |
| tree | 082dddb5dbb4f1bbb36fd84176a3de355995d332 /include/compiler.h | |
| parent | 9bfdf2dea93621c9231793e2ade6b56abf7f6b8d (diff) | |
| download | efi-boot-shim-4033d1fd0f25196f9a35e944679676277cd51960.tar.gz efi-boot-shim-4033d1fd0f25196f9a35e944679676277cd51960.zip | |
Fix compilation for older gcc
Signed-off-by: Alex Burmashev <alexander.burmashev@oracle.com>
Diffstat (limited to 'include/compiler.h')
| -rw-r--r-- | include/compiler.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/compiler.h b/include/compiler.h index 40358a11..18576724 100644 --- a/include/compiler.h +++ b/include/compiler.h @@ -18,7 +18,11 @@ # define RETURNS_NONNULL #else # define NONNULL(first, args...) __attribute__((__nonnull__(first, ## args))) +#if (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 9))) # define RETURNS_NONNULL __attribute__((__returns_nonnull__)) +#else +# define RETURNS_NONNULL +#endif #endif #ifndef UNUSED |
