From 86dabfe7e424609719500a51b4bd4c1bc038bcf7 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Fri, 2 Nov 2018 16:42:06 +0100 Subject: [PATCH] cmake: Only check for bounded attribute on OpenBSD Signed-off-by: Andreas Schneider --- ConfigureChecks.cmake | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake index 913cebd7..3530b579 100644 --- a/ConfigureChecks.cmake +++ b/ConfigureChecks.cmake @@ -370,6 +370,8 @@ int main(void) { return 0; }" HAVE_COMPILER__FUNCTION__) +# This is only available with OpenBSD's gcc implementation */ +if (OPENBSD) check_c_source_compiles(" #define ARRAY_LEN 16 void test_attr(const unsigned char *k) @@ -378,6 +380,7 @@ void test_attr(const unsigned char *k) int main(void) { return 0; }" HAVE_GCC_BOUNDED_ATTRIBUTE) +endif(OPENBSD) # Stop treating warnings as errors unset(CMAKE_REQUIRED_FLAGS)