summaryrefslogtreecommitdiff
path: root/net-libs/libtirpc/files/libtirpc-1.0.1_uclibc-use-memset-not-bzero.patch
blob: f7657f74db432f9ecf42b6260a3a021ec750c0b3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
Inspired by a similar fix here:
http://git.yoctoproject.org/cgit.cgi/poky/plain/meta/packages/nfs-utils/files/uclibc_bzero_fix.patch?id=39d8c0fc4a9d14b7bad1442e05c536e28b196a47

Because uclibc does not have a working implementation of `__bzero'.
---

diff -Naurp libtirpc-1.0.1.orig/src/des_impl.c libtirpc-1.0.1/src/des_impl.c
--- libtirpc-1.0.1.orig/src/des_impl.c	2017-07-05 06:16:07.441468000 +0000
+++ libtirpc-1.0.1/src/des_impl.c	2017-07-05 06:19:57.351468000 +0000
@@ -588,7 +588,11 @@ _des_crypt (char *buf, unsigned len, str
     }
   tin0 = tin1 = tout0 = tout1 = xor0 = xor1 = 0;
   tbuf[0] = tbuf[1] = 0;
+#ifndef __UCLIBC__
   __bzero (schedule, sizeof (schedule));
+#else
+  memset (schedule, 0, sizeof (schedule));
+#endif
 
   return (1);
 }