aboutsummaryrefslogtreecommitdiffstats
path: root/main/musl/0004-e94d0692-to-83c98aac.patch
blob: 88cf625fc877a89fdba24e65033795e3c46958b9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
diff --git a/src/internal/syscall.h b/src/internal/syscall.h
index 88fc89c..dcfae00 100644
--- a/src/internal/syscall.h
+++ b/src/internal/syscall.h
@@ -10,7 +10,7 @@ typedef long syscall_arg_t;
 #endif
 
 #if defined(__PIC__) && (100*__GNUC__+__GNUC_MINOR__ >= 303)
-__attribute__((visibility("protected")))
+__attribute__((visibility("hidden")))
 #endif
 long __syscall_ret(unsigned long), __syscall(syscall_arg_t, ...),
 	__syscall_cp(syscall_arg_t, syscall_arg_t, syscall_arg_t, syscall_arg_t,
diff --git a/src/math/modfl.c b/src/math/modfl.c
index f736bba..4b03a4b 100644
--- a/src/math/modfl.c
+++ b/src/math/modfl.c
@@ -3,7 +3,12 @@
 #if LDBL_MANT_DIG == 53 && LDBL_MAX_EXP == 1024
 long double modfl(long double x, long double *iptr)
 {
-	return modf(x, (double *)iptr);
+	double d;
+	long double r;
+
+	r = modf(x, &d);
+	*iptr = d;
+	return r;
 }
 #elif (LDBL_MANT_DIG == 64 || LDBL_MANT_DIG == 113) && LDBL_MAX_EXP == 16384
 #if LDBL_MANT_DIG == 64
diff --git a/src/math/sincosl.c b/src/math/sincosl.c
index 2c60080..d3ac1c4 100644
--- a/src/math/sincosl.c
+++ b/src/math/sincosl.c
@@ -4,7 +4,10 @@
 #if LDBL_MANT_DIG == 53 && LDBL_MAX_EXP == 1024
 void sincosl(long double x, long double *sin, long double *cos)
 {
-	sincos(x, (double *)sin, (double *)cos);
+	double sind, cosd;
+	sincos(x, &sind, &cosd);
+	*sin = sind;
+	*cos = cosd;
 }
 #elif (LDBL_MANT_DIG == 64 || LDBL_MANT_DIG == 113) && LDBL_MAX_EXP == 16384
 void sincosl(long double x, long double *sin, long double *cos)
diff --git a/src/string/memmem.c b/src/string/memmem.c
index 5211d75..a5a249f 100644
--- a/src/string/memmem.c
+++ b/src/string/memmem.c
@@ -139,6 +139,7 @@ void *memmem(const void *h0, size_t k, const void *n0, size_t l)
 	/* Use faster algorithms for short needles */
 	h = memchr(h0, *n, k);
 	if (!h || l==1) return (void *)h;
+	k -= h - (const unsigned char *)h0;
 	if (l==2) return twobyte_memmem(h, k, n);
 	if (l==3) return threebyte_memmem(h, k, n);
 	if (l==4) return fourbyte_memmem(h, k, n);