Skip to content

Commit

Permalink
sparse: check if floatn-common.h is available.
Browse files Browse the repository at this point in the history
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: 07aec2a sparse: Support newer GCC/glibc versions.
Signed-off-by: Flavio Leitner <fbl@sysclose.org>
Signed-off-by: Ben Pfaff <blp@ovn.org>
  • Loading branch information
fleitner authored and blp committed Sep 25, 2018
1 parent 6cad90d commit de5bd4f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion configure.ac
Expand Up @@ -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>]])

Expand Down
3 changes: 3 additions & 0 deletions include/sparse/bits/floatn.h
Expand Up @@ -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 */

0 comments on commit de5bd4f

Please sign in to comment.