Skip to contentSkip to conversation

libtirpc: Enable des APIs for musl

PATCH New Khem Raj 1 participant 1 message Apr 19, 2017

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH v2 3/5 libtirpc: Enable des APIs for musl

Use memset() API instead of __bzero()
Drop the patch removing des_* functions for musl

---
V1 -> V2
- Add missing Upstream-Status for patches

 .../0001-replace-__bzero-with-memset-API.patch     |  30 +++++
 .../libtirpc/remove-des-functionality.patch        | 139 ---------------------
 meta/recipes-extended/libtirpc/libtirpc_1.0.1.bb   |   5 +-
 3 files changed, 33 insertions(+), 141 deletions(-)
 create mode 100644 meta/recipes-extended/libtirpc/libtirpc/0001-replace-__bzero-with-memset-API.patch
 delete mode 100644 meta/recipes-extended/libtirpc/libtirpc/remove-des-functionality.patch
meta/recipes-extended/libtirpc/libtirpc/0001-replace-__bzero-with-memset-API.patch new file +30 -0
new file mode 100644
index 00000000000..d2b4da6ae2c
@@ -0,0 +1,30 @@
+From 20badc3e3608953fb5b36bb2e16fa51bd731aebc Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Tue, 18 Apr 2017 09:35:35 -0700
+Subject: [PATCH] replace __bzero() with memset() API
+
+memset is available across all libc implementation
+
+Signed-off-by: Khem Raj <[email protected]>
+---
+Upstream-Status: Pending
+
+ src/des_impl.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/des_impl.c b/src/des_impl.c
+index 9dbccaf..15bec2a 100644
+--- a/src/des_impl.c
++++ b/src/des_impl.c
+@@ -588,7 +588,7 @@ _des_crypt (char *buf, unsigned len, struct desparams *desp)
+     }
+   tin0 = tin1 = tout0 = tout1 = xor0 = xor1 = 0;
+   tbuf[0] = tbuf[1] = 0;
+-  __bzero (schedule, sizeof (schedule));
++  memset (schedule, 0, sizeof (schedule));
+ 
+   return (1);
+ }
+-- 
+2.12.2
+
meta/recipes-extended/libtirpc/libtirpc/remove-des-functionality.patch deleted +0 -139

139 lines not on this page · raw message

meta/recipes-extended/libtirpc/libtirpc_1.0.1.bb +3 -2
index b96abc4d57e..662c8999c20 100644
@@ -14,12 +14,13 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BP}.tar.bz2;name=libtirpc \
            file://libtirpc-1.0.2-rc3.patch \
            file://libtirpc-0.2.1-fortify.patch \
            file://export_key_secretkey_is_set.patch \
-          "
+           file://0001-replace-__bzero-with-memset-API.patch \
+           "
 
 SRC_URI_append_libc-uclibc = " file://remove-des-functionality.patch \
                              "
 
-SRC_URI_append_libc-musl = " file://remove-des-functionality.patch \
+SRC_URI_append_libc-musl = " \
                              file://Use-netbsd-queue.h.patch \
                            "
 
Signature · 1 line
2.12.2