mirror of https://github.com/xzeldon/htop.git
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.
This commit is contained in:
parent
cae47bb28d
commit
64a1ab848f
|
@ -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],
|
||||
[
|
||||
|
|
Loading…
Reference in New Issue