summaryrefslogtreecommitdiffstats
path: root/main/musl/0004-6e2bb7ac-to-4674809b.patch
blob: 62710e321c27a9f70448953f47b6aca281b36025 (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
60
61
62
63
64
65
66
67
68
diff --git a/src/ctype/iswlower.c b/src/ctype/iswlower.c
index c754fb9..79df44a 100644
--- a/src/ctype/iswlower.c
+++ b/src/ctype/iswlower.c
@@ -3,7 +3,7 @@
 
 int iswlower(wint_t wc)
 {
-	return towupper(wc) != wc || wc == 0xdf;
+	return towupper(wc) != wc;
 }
 
 int __iswlower_l(wint_t c, locale_t l)
diff --git a/src/ctype/towctrans.c b/src/ctype/towctrans.c
index 5e0889b..6af6187 100644
--- a/src/ctype/towctrans.c
+++ b/src/ctype/towctrans.c
@@ -151,7 +151,6 @@ static const unsigned short pairs[][2] = {
 	{ 0x03f7, 0x03f8 },
 	{ 0x03fa, 0x03fb },
 	{ 0x1e60, 0x1e9b },
-	{ 0xdf, 0xdf },
 	{ 0x1e9e, 0xdf },
 
 	{ 0x1f59, 0x1f51 },
diff --git a/src/network/getnameinfo.c b/src/network/getnameinfo.c
index 588ed76..2ba66e3 100644
--- a/src/network/getnameinfo.c
+++ b/src/network/getnameinfo.c
@@ -113,11 +113,10 @@ static void reverse_services(char *buf, int port, int dgram)
 
 static int dns_parse_callback(void *c, int rr, const void *data, int len, const void *packet)
 {
-	char tmp[256];
 	if (rr != RR_PTR) return 0;
 	if (__dn_expand(packet, (const unsigned char *)packet + 512,
-	    data, tmp, sizeof tmp) > 0)
-		strcpy(c, tmp);
+	    data, c, 256) <= 0)
+		*(char *)c = 0;
 	return 0;
 	
 }
diff --git a/src/thread/pthread_join.c b/src/thread/pthread_join.c
index 719c91c..abd2d66 100644
--- a/src/thread/pthread_join.c
+++ b/src/thread/pthread_join.c
@@ -8,6 +8,7 @@ static void dummy(void *p)
 int pthread_join(pthread_t t, void **res)
 {
 	int tmp;
+	pthread_testcancel();
 	while ((tmp = t->tid)) __timedwait(&t->tid, tmp, 0, 0, dummy, 0, 0);
 	if (res) *res = t->result;
 	if (t->map_base) munmap(t->map_base, t->map_size);
diff --git a/src/thread/sem_timedwait.c b/src/thread/sem_timedwait.c
index b5a60ad..68dcb50 100644
--- a/src/thread/sem_timedwait.c
+++ b/src/thread/sem_timedwait.c
@@ -8,6 +8,8 @@ static void cleanup(void *p)
 
 int sem_timedwait(sem_t *restrict sem, const struct timespec *restrict at)
 {
+	pthread_testcancel();
+
 	if (!sem_trywait(sem)) return 0;
 
 	int spins = 100;