This skip including floatn-common.h if it's not available since it
was introduced in glibc 2.27 and OVS doesn't not actually require
that to work with previous glibc version.

Fixes: 07aec2ac1 sparse: Support newer GCC/glibc versions.
Signed-off-by: Flavio Leitner <[email protected]>
---
 configure.ac                 | 2 +-
 include/sparse/bits/floatn.h | 3 +++
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index ba9e7d66d..aa92b151a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -110,7 +110,7 @@ AC_CHECK_MEMBERS([struct sockaddr_in6.sin6_scope_id], [], 
[],
 #include <netinet/in.h>]])
 AC_CHECK_FUNCS([mlockall strnlen getloadavg statvfs getmntent_r sendmmsg 
clock_gettime])
 AC_CHECK_HEADERS([mntent.h sys/statvfs.h linux/types.h linux/if_ether.h])
-AC_CHECK_HEADERS([linux/net_namespace.h stdatomic.h])
+AC_CHECK_HEADERS([linux/net_namespace.h stdatomic.h bits/floatn-common.h])
 AC_CHECK_HEADERS([net/if_mib.h], [], [], [[#include <sys/types.h>
 #include <net/if.h>]])
 
diff --git a/include/sparse/bits/floatn.h b/include/sparse/bits/floatn.h
index a247331eb..624a1660a 100644
--- a/include/sparse/bits/floatn.h
+++ b/include/sparse/bits/floatn.h
@@ -27,6 +27,9 @@
 #define __HAVE_FLOAT128 0
 #define __HAVE_FLOAT64X 0
 
+#ifdef HAVE_BITS_FLOATN_COMMON_H
+/* Introduced in glibc 2.27 */
 #include <bits/floatn-common.h>
+#endif
 
 #endif /* <bits/floatn.h> for sparse */
-- 
2.14.4


_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to