Copied as is from the official musl git mirror
git://git.musl-libc.org/musl, commit
6fcb440d.
We only keep the non optimized definition since
all the long double math functions from newlib
are wrappers over double.
Signed-off-by: Vlad-Andrei Badoiu <vlad_andrei.badoiu@stud.acs.upb.ro>
Reviewed-by: Felipe Huici <felipe.huici@neclab.eu>
LIBNEWLIBGLUE_SRCS-y += $(LIBNEWLIBC_BASE)/musl-imported/src/misc/syslog.c
LIBNEWLIBGLUE_SRCS-y += $(LIBNEWLIBC_BASE)/musl-imported/src/termios/tcsetattr.c
LIBNEWLIBGLUE_SRCS-y += $(LIBNEWLIBC_BASE)/musl-imported/src/termios/tcgetattr.c
+LIBNEWLIBGLUE_SRCS-y += $(LIBNEWLIBC_BASE)/musl-imported/src/math/sincosl.c
ifeq ($(CONFIG_LIBNEWLIBC_CRYPT),y)
LIBNEWLIBGLUE_CFLAGS-y += -Wno-missing-braces -Wno-sign-compare -Wno-char-subscripts
--- /dev/null
+#define _GNU_SOURCE
+
+#include <math.h>
+
+void sincosl(long double x, long double *sin, long double *cos)
+{
+ double sind, cosd;
+
+ sincos(x, &sind, &cosd);
+ *sin = sind;
+ *cos = cosd;
+}