diff mbox

[1/7] des_impl: Use bzero instead of __bzero

Message ID 20160417091004.GA2737@nyan (mailing list archive)
State New, archived
Headers show

Commit Message

Felix Janda April 17, 2016, 9:10 a.m. UTC
Fixes compilation error with musl libc:

.libs/libtirpc_la-des_impl.o: In function `_des_crypt':
src/des_impl.c:591: undefined reference to `__bzero'

Signed-off-by: Felix Janda <felix.janda@posteo.de>
---
 src/des_impl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Mike Frysinger April 17, 2016, 4:17 p.m. UTC | #1
On 17 Apr 2016 11:10, Felix Janda wrote:
> Fixes compilation error with musl libc:
> 
> .libs/libtirpc_la-des_impl.o: In function `_des_crypt':
> src/des_impl.c:591: undefined reference to `__bzero'
>
> --- 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));
> +  bzero (schedule, sizeof (schedule));

might as well convert to memset while you're at it since bzero is deprecated
-mike
diff mbox

Patch

diff --git a/src/des_impl.c b/src/des_impl.c
index 9dbccaf..dbcfaa1 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));
+  bzero (schedule, sizeof (schedule));
 
   return (1);
 }