From f81bc3de387e3ff229433a2db8632b33bd62e94f Mon Sep 17 00:00:00 2001 From: dearblue Date: Sun, 28 Nov 2021 17:28:44 +0900 Subject: Fixed compile error for `mrbgems/mruby-cmath` with `clang++` If the preprocessor check part is only `__clang__`, CI's such as `Ubuntu-2004-clang` will fail to compile. This is why we limited the addition to FreeBSD and OpenBSD, which have `clang++` in their base systems. DragonFly BSD and NetBSD have GCC built into their base systems, so nothing is changed. --- mrbgems/mruby-cmath/src/cmath.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mrbgems/mruby-cmath/src/cmath.c b/mrbgems/mruby-cmath/src/cmath.c index 8b0c4d04a..de59adf96 100644 --- a/mrbgems/mruby-cmath/src/cmath.c +++ b/mrbgems/mruby-cmath/src/cmath.c @@ -92,7 +92,7 @@ CXDIVc(mrb_complex a, mrb_complex b) #else -#if defined(__cplusplus) && defined(__APPLE__) +#if defined(__cplusplus) && (defined(__APPLE__) || (defined(__clang__) && (defined(__FreeBSD__) || defined(__OpenBSD__)))) #ifdef MRB_USE_FLOAT32 typedef std::complex mrb_complex; -- cgit v1.2.3