summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakob Kaivo <jkk@ung.org>2024-01-31 11:59:09 -0500
committerJakob Kaivo <jkk@ung.org>2024-01-31 11:59:09 -0500
commit237b7564dc3179f8c2a91820aae3f4c2d8534bcf (patch)
tree43bbcd05bcb0c36397aaeb3390dbc81c7812f459
parent9d61b058d856e8647848dd1122e4b9ea6c486d3b (diff)
fix compilation issues
-rw-r--r--src/math/_tgmath.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/math/_tgmath.h b/src/math/_tgmath.h
index 980d3c45..262a59a9 100644
--- a/src/math/_tgmath.h
+++ b/src/math/_tgmath.h
@@ -1,6 +1,7 @@
#ifndef __NONSTD_TGMATH_H__
#define __NONSTD_TGMATH_H__
#include <math.h>
+#include <fenv.h>
#include "_safety.h"
#ifndef FP_ZERO
@@ -41,7 +42,7 @@
#endif
#ifndef copysign
-#define copysign(_x, _y) (_x < 0 ? -_y : _y)
+#define copysign(_x, _y) ((_x) < 0 ? -(_y) : (_y))
#endif
#ifndef M_PI