summaryrefslogtreecommitdiff
path: root/dev-libs/nspr/files/nspr-4.21-ipv6-musl-support.patch
blob: 72393ca5f470a306d74cafc3d030c982c39c4d8b (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
From 2e6a43c751707b6983760669988ba4d2826ffd5b Mon Sep 17 00:00:00 2001
From: Violet Purcell <vimproved@inventati.org>
Date: Sat, 10 Jun 2023 04:37:55 +0000
Subject: [PATCH] Added IPv6 compatibility for musl libc

--- a/pr/include/md/_linux.h
+++ b/pr/include/md/_linux.h
@@ -315,33 +315,19 @@ static inline PRInt32 _MD_ATOMIC_SET(PRInt32 *ptr, PRInt32 nv)
 #endif /* __arm__ */
 
 #define USE_SETJMP
-#if (defined(__GLIBC__) && __GLIBC__ >= 2) || defined(ANDROID)
 #define _PR_POLL_AVAILABLE
-#endif
 #undef _PR_USE_POLL
 #define _PR_STAT_HAS_ONLY_ST_ATIME
-#if defined(__alpha) || defined(__ia64__)
 #define _PR_HAVE_LARGE_OFF_T
-#elif (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) \
-    || defined(ANDROID)
-#define _PR_HAVE_OFF64_T
-#else
-#define _PR_NO_LARGE_FILES
-#endif
-#if (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) \
-    || defined(ANDROID)
+#define _FILE_OFFSET_BITS 64
 #define _PR_INET6
 #define _PR_HAVE_INET_NTOP
 #define _PR_HAVE_GETHOSTBYNAME2
 #define _PR_HAVE_GETADDRINFO
 #define _PR_INET6_PROBE
-#endif
 #ifndef ANDROID
 #define _PR_HAVE_SYSV_SEMAPHORES
 #define PR_HAVE_SYSV_NAMED_SHARED_MEMORY
-#endif
-/* Android has gethostbyname_r but not gethostbyaddr_r or gethostbyname2_r. */
-#if (__GLIBC__ >= 2) && defined(_PR_PTHREADS)
 #define _PR_HAVE_GETHOST_R
 #define _PR_HAVE_GETHOST_R_INT
 #endif
-- 
2.41.0