summaryrefslogtreecommitdiff
path: root/skip/samba/musl_uintptr.patch
diff options
context:
space:
mode:
authordavidovski <david@davidovski.xyz>2023-02-02 14:10:02 +0000
committerdavidovski <david@davidovski.xyz>2023-02-02 14:10:02 +0000
commitf29d569cd33a73da5ad675f43a34ad53c5cc9bc6 (patch)
tree76fe6267f8307e7630fc6f53ff99a9767ad40de0 /skip/samba/musl_uintptr.patch
parent05d004dfe0c9a9d898fac8a4a0292ca2a74ca391 (diff)
Work
Diffstat (limited to 'skip/samba/musl_uintptr.patch')
-rw-r--r--skip/samba/musl_uintptr.patch35
1 files changed, 35 insertions, 0 deletions
diff --git a/skip/samba/musl_uintptr.patch b/skip/samba/musl_uintptr.patch
new file mode 100644
index 0000000..de7f285
--- /dev/null
+++ b/skip/samba/musl_uintptr.patch
@@ -0,0 +1,35 @@
+commit f81e5b71ce78f33250347914dacc75c8463bf102
+Author: Breno Leitao <breno.leitao@gmail.com>
+Date: Wed Mar 29 15:22:38 2017 -0300
+
+ include: Check for previous declaration of uintptr_t
+
+ Adding a extra check before declaring uintptr_t. Currently musl uses
+ macro __DEFINED_uintptr_t once it defines uintptr_t type. Checking
+ this macro before defining it, and, defining it when uintptr_t is
+ defined.
+
+ Signed-off-by: Breno Leitao <breno.leitao@gmail.com>
+
+diff --git a/third_party/cmocka/cmocka.h b/third_party/cmocka/cmocka.h
+index 303d0ae..a2bfc40 100644
+--- a/third_party/cmocka/cmocka.h
++++ b/third_party/cmocka/cmocka.h
+@@ -111,7 +111,7 @@
+ ((LargestIntegralType)(value))
+
+ /* Smallest integral type capable of holding a pointer. */
+-#if !defined(_UINTPTR_T) && !defined(_UINTPTR_T_DEFINED)
++#if !defined(_UINTPTR_T) && !defined(_UINTPTR_T_DEFINED) && !defined(__DEFINED_uintptr_t)
+ # if defined(_WIN32)
+ /* WIN32 is an ILP32 platform */
+ typedef unsigned int uintptr_t;
+@@ -137,6 +137,8 @@
+
+ # define _UINTPTR_T
+ # define _UINTPTR_T_DEFINED
++# define __DEFINED_uintptr_t
++
+ #endif /* !defined(_UINTPTR_T) || !defined(_UINTPTR_T_DEFINED) */
+
+ /* Perform an unsigned cast to uintptr_t. */