* [Buildroot] [PATCH] util-linux: fix link failures due to name clash
@ 2017-11-06 23:14 Luca Ceresoli
2017-11-07 0:19 ` Carlos Santos
0 siblings, 1 reply; 4+ messages in thread
From: Luca Ceresoli @ 2017-11-06 23:14 UTC (permalink / raw)
To: buildroot
Several packages have a similar md5.c file, and each has a function
named byteReverse(). This generates link errors ("multiple definition
of `byteReverse'").
Fix by declaring byteReverse as static, since it is just an internal
function.
Fixes:
http://autobuild.buildroot.net/results/419ab2c0e034cc68991281c51caa8271b0fadbab/
Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Cc: Adam Duskett <aduskett@gmail.com>
---
I sent this patch upstream more than half an hour ago, but it still
hasn't landed on the mailing-list...
---
.../0001-md5-declare-byteReverse-as-static.patch | 42 ++++++++++++++++++++++
1 file changed, 42 insertions(+)
create mode 100644 package/util-linux/0001-md5-declare-byteReverse-as-static.patch
diff --git a/package/util-linux/0001-md5-declare-byteReverse-as-static.patch b/package/util-linux/0001-md5-declare-byteReverse-as-static.patch
new file mode 100644
index 000000000000..12f77a906f9e
--- /dev/null
+++ b/package/util-linux/0001-md5-declare-byteReverse-as-static.patch
@@ -0,0 +1,42 @@
+From a02ec53951ea8ac10fef1115f323c0c288596163 Mon Sep 17 00:00:00 2001
+From: Luca Ceresoli <luca@lucaceresoli.net>
+Date: Mon, 6 Nov 2017 22:58:09 +0100
+Subject: [PATCH] md5: declare byteReverse as static
+
+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
+
--
2.7.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH] util-linux: fix link failures due to name clash
2017-11-06 23:14 [Buildroot] [PATCH] util-linux: fix link failures due to name clash Luca Ceresoli
@ 2017-11-07 0:19 ` Carlos Santos
2017-11-07 0:45 ` Carlos Santos
0 siblings, 1 reply; 4+ messages in thread
From: Carlos Santos @ 2017-11-07 0:19 UTC (permalink / raw)
To: buildroot
> From: "Luca Ceresoli" <luca@lucaceresoli.net>
> To: buildroot at buildroot.org
> Cc: "Luca Ceresoli" <luca@lucaceresoli.net>, "Adam Duskett" <aduskett@gmail.com>
> Sent: Monday, November 6, 2017 9:14:01 PM
> Subject: [Buildroot] [PATCH] util-linux: fix link failures due to name clash
> Several packages have a similar md5.c file, and each has a function
> named byteReverse(). This generates link errors ("multiple definition
> of `byteReverse'").
>
> Fix by declaring byteReverse as static, since it is just an internal
> function.
>
> Fixes:
> http://autobuild.buildroot.net/results/419ab2c0e034cc68991281c51caa8271b0fadbab/
Did you submit this patch upstream?
--
Carlos Santos (Casantos) - DATACOM, P&D
?The greatest triumph that modern PR can offer is the transcendent
success of having your words and actions judged by your reputation,
rather than the other way about.? ? Christopher Hitchens
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH] util-linux: fix link failures due to name clash
2017-11-07 0:19 ` Carlos Santos
@ 2017-11-07 0:45 ` Carlos Santos
2017-11-07 22:26 ` Luca Ceresoli
0 siblings, 1 reply; 4+ messages in thread
From: Carlos Santos @ 2017-11-07 0:45 UTC (permalink / raw)
To: buildroot
> From: "Carlos Santos" <casantos@datacom.ind.br>
> To: "Luca Ceresoli" <luca@lucaceresoli.net>
> Cc: "Adam Duskett" <aduskett@gmail.com>, buildroot at buildroot.org
> Sent: Monday, November 6, 2017 10:19:55 PM
> Subject: Re: [Buildroot] [PATCH] util-linux: fix link failures due to name clash
>> From: "Luca Ceresoli" <luca@lucaceresoli.net>
>> To: buildroot at buildroot.org
>> Cc: "Luca Ceresoli" <luca@lucaceresoli.net>, "Adam Duskett" <aduskett@gmail.com>
>> Sent: Monday, November 6, 2017 9:14:01 PM
>> Subject: [Buildroot] [PATCH] util-linux: fix link failures due to name clash
>
>> Several packages have a similar md5.c file, and each has a function
>> named byteReverse(). This generates link errors ("multiple definition
>> of `byteReverse'").
>>
>> Fix by declaring byteReverse as static, since it is just an internal
>> function.
>>
>> Fixes:
>> http://autobuild.buildroot.net/results/419ab2c0e034cc68991281c51caa8271b0fadbab/
>
> Did you submit this patch upstream?
[Do not hit ?send? before completing the the message, dooh!]
Perhaps it was blocked by the util-linux MLM. Did you submit the patch as a plain-text message using git send-email?
--
Carlos Santos (Casantos) - DATACOM, P&D
?The greatest triumph that modern PR can offer is the transcendent
success of having your words and actions judged by your reputation,
rather than the other way about.? ? Christopher Hitchens
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH] util-linux: fix link failures due to name clash
2017-11-07 0:45 ` Carlos Santos
@ 2017-11-07 22:26 ` Luca Ceresoli
0 siblings, 0 replies; 4+ messages in thread
From: Luca Ceresoli @ 2017-11-07 22:26 UTC (permalink / raw)
To: buildroot
Hi Carlos,
On 07/11/2017 01:45, Carlos Santos wrote:
>> From: "Carlos Santos" <casantos@datacom.ind.br>
>> To: "Luca Ceresoli" <luca@lucaceresoli.net>
>> Cc: "Adam Duskett" <aduskett@gmail.com>, buildroot at buildroot.org
>> Sent: Monday, November 6, 2017 10:19:55 PM
>> Subject: Re: [Buildroot] [PATCH] util-linux: fix link failures due to name clash
>
>>> From: "Luca Ceresoli" <luca@lucaceresoli.net>
>>> To: buildroot at buildroot.org
>>> Cc: "Luca Ceresoli" <luca@lucaceresoli.net>, "Adam Duskett" <aduskett@gmail.com>
>>> Sent: Monday, November 6, 2017 9:14:01 PM
>>> Subject: [Buildroot] [PATCH] util-linux: fix link failures due to name clash
>>
>>> Several packages have a similar md5.c file, and each has a function
>>> named byteReverse(). This generates link errors ("multiple definition
>>> of `byteReverse'").
>>>
>>> Fix by declaring byteReverse as static, since it is just an internal
>>> function.
>>>
>>> Fixes:
>>> http://autobuild.buildroot.net/results/419ab2c0e034cc68991281c51caa8271b0fadbab/
>>
>> Did you submit this patch upstream?
>
> [Do not hit ?send? before completing the the message, dooh!]
>
> Perhaps it was blocked by the util-linux MLM. Did you submit the patch as a plain-text message using git send-email?
I sent with git send-email, but apparently I'm having issues with
sending to vger.kernel.org, that I'm trying to solve with my ISP.
In the meanwhile I sent the patch from a different account, so at least
it's there for review. I also sent v2 of this patch to mark the new
upstream status.
Thanks,
--
Luca
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-11-07 22:26 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-06 23:14 [Buildroot] [PATCH] util-linux: fix link failures due to name clash Luca Ceresoli
2017-11-07 0:19 ` Carlos Santos
2017-11-07 0:45 ` Carlos Santos
2017-11-07 22:26 ` Luca Ceresoli
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.