diff mbox series

[meta-networking,2/4] samba: use external cmocka instead of bundled cmocka

Message ID 20231012115614.3133797-2-yi.zhao@windriver.com
State Under Review
Headers show
Series [meta-networking,1/4] samba: upgrade 4.18.6 -> 4.18.8 | expand

Commit Message

Yi Zhao Oct. 12, 2023, 11:56 a.m. UTC
Do not use bundled cmocka to get rid of bundled library
libcmocka-samba4.so.

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
---
 .../samba/samba/cmocka-uintptr_t.patch        | 51 -------------------
 .../samba/samba_4.18.8.bb                     |  5 +-
 2 files changed, 2 insertions(+), 54 deletions(-)
 delete mode 100644 meta-networking/recipes-connectivity/samba/samba/cmocka-uintptr_t.patch
diff mbox series

Patch

diff --git a/meta-networking/recipes-connectivity/samba/samba/cmocka-uintptr_t.patch b/meta-networking/recipes-connectivity/samba/samba/cmocka-uintptr_t.patch
deleted file mode 100644
index e6e878433..000000000
--- a/meta-networking/recipes-connectivity/samba/samba/cmocka-uintptr_t.patch
+++ /dev/null
@@ -1,51 +0,0 @@ 
-From 14f8ee7cd1318567b00e52217d57f0a528fd2cf7 Mon Sep 17 00:00:00 2001
-From: Changqing Li <changqing.li@windriver.com>
-Date: Wed, 25 Jul 2018 09:55:25 +0800
-Subject: [PATCH] samba: cmocka.h: fix musl libc conflicting types error
-
-Fix build on qemumips64(el)
-
-taken from:
-[PATCH] libldb: fix musl libc conflicting types error
-
-/third_party/cmocka/cmocka.h:126:28: error: conflicting types for 'uintptr_t'
-            typedef unsigned int uintptr_t;
-                                 ^~~~~~~~~
-use __DEFINED_uintptr_t in alltypes.h to check if uintptr already defined
-
-Upstream-Status: Pending
-
-Signed-off-by: Changqing Li <changqing.li@windriver.com>
-Signed-off-by: Andrea Adami <andrea.adami@gmail.com>
----
- third_party/cmocka/cmocka.h | 7 +++----
- 1 file changed, 3 insertions(+), 4 deletions(-)
-
-diff --git a/third_party/cmocka/cmocka.h b/third_party/cmocka/cmocka.h
-index e6861c8..238201d 100644
---- a/third_party/cmocka/cmocka.h
-+++ b/third_party/cmocka/cmocka.h
-@@ -111,7 +111,7 @@ typedef uintmax_t LargestIntegralType;
-     ((LargestIntegralType)(value))
- 
- /* Smallest integral type capable of holding a pointer. */
--#if !defined(_UINTPTR_T) && !defined(_UINTPTR_T_DEFINED)
-+#if !defined(__DEFINED_uintptr_t)
- # if defined(_WIN32)
-     /* WIN32 is an ILP32 platform */
-     typedef unsigned int uintptr_t;
-@@ -135,9 +135,8 @@ typedef uintmax_t LargestIntegralType;
- #  endif /* __WORDSIZE */
- # endif /* _WIN32 */
- 
--# define _UINTPTR_T
--# define _UINTPTR_T_DEFINED
--#endif /* !defined(_UINTPTR_T) || !defined(_UINTPTR_T_DEFINED) */
-+# define __DEFINED_uintptr_t
-+#endif /* !defined(__DEFINED_uintptr_t) */
- 
- /* Perform an unsigned cast to uintptr_t. */
- #define cast_to_pointer_integral_type(value) \
--- 
-2.25.1
-
diff --git a/meta-networking/recipes-connectivity/samba/samba_4.18.8.bb b/meta-networking/recipes-connectivity/samba/samba_4.18.8.bb
index 1ded9fe5e..dc9bc1a7f 100644
--- a/meta-networking/recipes-connectivity/samba/samba_4.18.8.bb
+++ b/meta-networking/recipes-connectivity/samba/samba_4.18.8.bb
@@ -29,7 +29,6 @@  SRC_URI = "${SAMBA_MIRROR}/stable/samba-${PV}.tar.gz \
 SRC_URI:append:libc-musl = " \
            file://samba-pam.patch \
            file://samba-4.3.9-remove-getpwent_r.patch \
-           file://cmocka-uintptr_t.patch \
            "
 
 SRC_URI[sha256sum] = "4fb87bceaeb01d832a59046c197a044b7e8e8000581548b5d577a6cda03344d1"
@@ -43,7 +42,7 @@  CVE_STATUS[CVE-2011-2411] = "not-applicable-platform: vulnerable only on HP NonS
 # remove default added RDEPENDS on perl
 RDEPENDS:${PN}:remove = "perl"
 
-DEPENDS += "readline virtual/libiconv zlib popt libtalloc libtdb libtevent libldb libaio libpam libtasn1 jansson libparse-yapp-perl-native gnutls"
+DEPENDS += "readline virtual/libiconv zlib popt libtalloc libtdb libtevent libldb libaio libpam libtasn1 libtasn1-native jansson libparse-yapp-perl-native gnutls cmocka"
 
 inherit features_check
 REQUIRED_DISTRO_FEATURES = "pam"
@@ -105,7 +104,7 @@  SAMBA4_MODULES="${SAMBA4_IDMAP_MODULES},${SAMBA4_PDB_MODULES},${SAMBA4_AUTH_MODU
 # .so files so there will not be a conflict.  This is not done consistantly, so be very careful
 # when adding to this list.
 #
-SAMBA4_LIBS="heimdal,cmocka,NONE"
+SAMBA4_LIBS="heimdal,NONE"
 
 EXTRA_OECONF += "--enable-fhs \
                  --with-piddir=/run \