diff options
author | Christian Göttsche <cgzones@googlemail.com> | 2021-02-05 15:20:00 +0100 |
---|---|---|
committer | Christian Göttsche <cgzones@googlemail.com> | 2021-02-05 15:20:00 +0100 |
commit | 64a1ab848f4cba7b9dd4705a169034e39048d27d (patch) | |
tree | ee68934ce54491ffed97f109ac55c1cae6458bb0 /configure.ac | |
parent | cae47bb28d3d1f8db41edf55f1b055cf8552d806 (diff) |
configure: ignore usage of C11 _Generic on FreeBSD
BatteryMeter.c:30:8: error: '_Generic' is a C11 extension [-Werror,-Wc11-extensions]
if (isnan(percent)) {
^
/usr/include/math.h:114:2: note: expanded from macro 'isnan'
__fp_type_select(x, __inline_isnanf, __inline_isnan, __inline_isnanl)
^
/usr/include/math.h:82:39: note: expanded from macro '__fp_type_select'
#define __fp_type_select(x, f, d, ld) _Generic((x), \
^
1 error generated.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 6fdb8173..7bac0426 100644 --- a/configure.ac +++ b/configure.ac @@ -531,6 +531,11 @@ AM_CFLAGS="\ -Wunused\ -Wwrite-strings" +# FreeBSD uses C11 _Generic in its isnan implementation, even with -std=c99 +if test "$my_htop_platform" = freebsd; then + AM_CFLAGS="$AM_CFLAGS -Wno-c11-extensions" +fi + dnl https://www.gnu.org/software/autoconf-archive/ax_check_compile_flag.html AC_DEFUN([AX_CHECK_COMPILE_FLAG], [ |