diff mbox series

[1/1] package/samba4: fix uclibc build with openldap

Message ID 20200516162731.1708912-1-fontaine.fabrice@gmail.com
State Accepted
Headers show
Series [1/1] package/samba4: fix uclibc build with openldap | expand

Commit Message

Fabrice Fontaine May 16, 2020, 4:27 p.m. UTC
Fixes:
 - http://autobuild.buildroot.org/results/09e84d15efe755bdefa9f8c6b8355c49ddbc2f65

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 ...st.c-include-stdint.h-before-cmoka.h.patch | 40 +++++++++++++++++++
 1 file changed, 40 insertions(+)
 create mode 100644 package/samba4/0004-ldap_message_test.c-include-stdint.h-before-cmoka.h.patch

Comments

Thomas Petazzoni Oct. 17, 2020, 12:52 p.m. UTC | #1
On Sat, 16 May 2020 18:27:31 +0200
Fabrice Fontaine <fontaine.fabrice@gmail.com> wrote:

> Fixes:
>  - http://autobuild.buildroot.org/results/09e84d15efe755bdefa9f8c6b8355c49ddbc2f65
> 
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> ---
>  ...st.c-include-stdint.h-before-cmoka.h.patch | 40 +++++++++++++++++++
>  1 file changed, 40 insertions(+)
>  create mode 100644 package/samba4/0004-ldap_message_test.c-include-stdint.h-before-cmoka.h.patch

Applied to master, thanks. Could you submit the patch upstream? A
similar issue was reported at
https://gitlab.com/cmocka/cmocka/-/issues/7 and fixed in
https://gitlab.com/cmocka/cmocka/-/commit/dd8449ae3ba7fd05ac172f0227cd93af7f37005e.
I looked briefly, and the problem is that cmocka.h wants to define its
own uintptr_t, and it does it in a way that is broken for mips64. As
explained in the bug report, cmocka.h should probably not try to define
its own uintptr_t, and should instead always rely on the one provided
by stdint.h.

Thanks!

Thomas
Peter Korsgaard Oct. 29, 2020, 1:59 p.m. UTC | #2
>>>>> "Fabrice" == Fabrice Fontaine <fontaine.fabrice@gmail.com> writes:

 > Fixes:
 >  - http://autobuild.buildroot.org/results/09e84d15efe755bdefa9f8c6b8355c49ddbc2f65

 > Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>

Committed to 2020.02.x and 2020.08.x, thanks.
diff mbox series

Patch

diff --git a/package/samba4/0004-ldap_message_test.c-include-stdint.h-before-cmoka.h.patch b/package/samba4/0004-ldap_message_test.c-include-stdint.h-before-cmoka.h.patch
new file mode 100644
index 0000000000..e63f43c290
--- /dev/null
+++ b/package/samba4/0004-ldap_message_test.c-include-stdint.h-before-cmoka.h.patch
@@ -0,0 +1,40 @@ 
+From b2ea5dc3639d68b878c6534f4992da446dbbf2d4 Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+Date: Sat, 16 May 2020 18:15:38 +0200
+Subject: [PATCH] ldap_message_test.c: include stdint.h before cmoka.h
+
+This fix the following build failure on uclibc:
+
+In file included from /home/giuliobenetti/autobuild/run/instance-1/output-1/host/opt/ext-toolchain/lib/gcc/mips64el-buildroot-linux-uclibc/5.5.0/include/stdint.h:9:0,
+                 from /home/giuliobenetti/autobuild/run/instance-1/output-1/host/mips64el-buildroot-linux-uclibc/sysroot/usr/include/inttypes.h:27,
+                 from ../../lib/replace/../replace/replace.h:64,
+                 from ../../source4/include/includes.h:23,
+                 from ../../libcli/ldap/tests/ldap_message_test.c:41:
+/home/giuliobenetti/autobuild/run/instance-1/output-1/host/mips64el-buildroot-linux-uclibc/sysroot/usr/include/stdint.h:122:27: error: conflicting types for 'uintptr_t'
+ typedef unsigned long int uintptr_t;
+                           ^
+
+Fixes:
+ - http://autobuild.buildroot.org/results/09e84d15efe755bdefa9f8c6b8355c49ddbc2f65
+
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+[Upstream status: not sent yet]
+---
+ libcli/ldap/tests/ldap_message_test.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/libcli/ldap/tests/ldap_message_test.c b/libcli/ldap/tests/ldap_message_test.c
+index c5aacd4bc6b..51331e5c600 100644
+--- a/libcli/ldap/tests/ldap_message_test.c
++++ b/libcli/ldap/tests/ldap_message_test.c
+@@ -34,6 +34,7 @@
+  */
+ #include <stdarg.h>
+ #include <stddef.h>
++#include <stdint.h>
+ #include <setjmp.h>
+ #include <cmocka.h>
+ 
+-- 
+2.26.2
+