linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/7] des_impl: Use bzero instead of __bzero
@ 2016-04-17  9:10 Felix Janda
  2016-04-17 16:17 ` [Libtirpc-devel] " Mike Frysinger
  0 siblings, 1 reply; 3+ messages in thread
From: Felix Janda @ 2016-04-17  9:10 UTC (permalink / raw)
  To: libtirpc-devel; +Cc: linux-nfs

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(-)

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);
 }
-- 
2.7.3


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Libtirpc-devel] [PATCH 1/7] des_impl: Use bzero instead of __bzero
  2016-04-17  9:10 [PATCH 1/7] des_impl: Use bzero instead of __bzero Felix Janda
@ 2016-04-17 16:17 ` Mike Frysinger
  2016-04-17 17:45   ` [PATCH v2] Replace bzero and __bzero by memset Felix Janda
  0 siblings, 1 reply; 3+ messages in thread
From: Mike Frysinger @ 2016-04-17 16:17 UTC (permalink / raw)
  To: Felix Janda; +Cc: libtirpc-devel, linux-nfs

[-- Attachment #1: Type: text/plain, Size: 606 bytes --]

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

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH v2] Replace bzero and __bzero by memset
  2016-04-17 16:17 ` [Libtirpc-devel] " Mike Frysinger
@ 2016-04-17 17:45   ` Felix Janda
  0 siblings, 0 replies; 3+ messages in thread
From: Felix Janda @ 2016-04-17 17:45 UTC (permalink / raw)
  To: libtirpc-devel, linux-nfs

Fixes in particular a 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/auth_time.c    | 2 +-
 src/des_impl.c     | 2 +-
 src/svc_auth_des.c | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/auth_time.c b/src/auth_time.c
index 7f83ab4..210d251 100644
--- a/src/auth_time.c
+++ b/src/auth_time.c
@@ -317,7 +317,7 @@ __rpc_get_time_offset(td, srv, thost, uaddr, netid)
 	sprintf(ipuaddr, "%d.%d.%d.%d.0.111", a1, a2, a3, a4);
 	useua = &ipuaddr[0];
 
-	bzero((char *)&sin, sizeof(sin));
+	memset((char *)&sin, 0, sizeof(sin));
 	if (uaddr_to_sockaddr(useua, &sin)) {
 		msg("unable to translate uaddr to sockaddr.");
 		if (needfree)
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);
 }
diff --git a/src/svc_auth_des.c b/src/svc_auth_des.c
index 73de033..9235eea 100644
--- a/src/svc_auth_des.c
+++ b/src/svc_auth_des.c
@@ -356,7 +356,7 @@ cache_init()
 
 	authdes_cache = (struct cache_entry *)
 		mem_alloc(sizeof(struct cache_entry) * AUTHDES_CACHESZ);	
-	bzero((char *)authdes_cache, 
+	memset((char *)authdes_cache, 0
 		sizeof(struct cache_entry) * AUTHDES_CACHESZ);
 
 	authdes_lru = (short *)mem_alloc(sizeof(short) * AUTHDES_CACHESZ);
-- 
2.7.3


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-04-17 17:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-17  9:10 [PATCH 1/7] des_impl: Use bzero instead of __bzero Felix Janda
2016-04-17 16:17 ` [Libtirpc-devel] " Mike Frysinger
2016-04-17 17:45   ` [PATCH v2] Replace bzero and __bzero by memset Felix Janda

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).