* [PATCH] md5: declare byteReverse as static
@ 2017-11-07 13:39 Luca Ceresoli
2017-11-08 10:54 ` Karel Zak
0 siblings, 1 reply; 2+ messages in thread
From: Luca Ceresoli @ 2017-11-07 13:39 UTC (permalink / raw)
To: util-linux; +Cc: Luca Ceresoli
From: Luca Ceresoli <luca@lucaceresoli.net>
byteReverse() is an internal function in md5.c, and is not exposed via
any header file, but it is not declared as static. This is a problem
with the md5.c file since it is copied more or less verbatim in other
programs (fontconfig and pjsip among others), causing a link error
when linking two of them together.
Fixes link failures such as:
http://autobuild.buildroot.net/results/419ab2c0e034cc68991281c51caa8271b0fadbab/build-end.log
Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
---
lib/md5.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/md5.c b/lib/md5.c
index 488d16ef69b4..282e2d22af25 100644
--- a/lib/md5.c
+++ b/lib/md5.c
@@ -21,13 +21,13 @@
#if !defined(WORDS_BIGENDIAN)
#define byteReverse(buf, len) /* Nothing */
#else
-void byteReverse(unsigned char *buf, unsigned longs);
+static void byteReverse(unsigned char *buf, unsigned longs);
#ifndef ASM_MD5
/*
* Note: this code is harmless on little-endian machines.
*/
-void byteReverse(unsigned char *buf, unsigned longs)
+static void byteReverse(unsigned char *buf, unsigned longs)
{
uint32_t t;
do {
--
2.7.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] md5: declare byteReverse as static
2017-11-07 13:39 [PATCH] md5: declare byteReverse as static Luca Ceresoli
@ 2017-11-08 10:54 ` Karel Zak
0 siblings, 0 replies; 2+ messages in thread
From: Karel Zak @ 2017-11-08 10:54 UTC (permalink / raw)
To: Luca Ceresoli; +Cc: util-linux, Luca Ceresoli
On Tue, Nov 07, 2017 at 02:39:09PM +0100, Luca Ceresoli wrote:
> From: Luca Ceresoli <luca@lucaceresoli.net>
>
> byteReverse() is an internal function in md5.c, and is not exposed via
> any header file, but it is not declared as static.
Well, we use symbols script (libuuid/src/libuuid.sym), so for standard
linker all another symbols are invisible. The problem is static build...
> lib/md5.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
Applied, thanks!
Karel
--
Karel Zak <kzak@redhat.com>
http://karelzak.blogspot.com
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-11-08 10:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-07 13:39 [PATCH] md5: declare byteReverse as static Luca Ceresoli
2017-11-08 10:54 ` Karel Zak
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.