* [Buildroot] [PATCH] libpjsip: fix static build failures due to name clash
@ 2017-11-10 22:16 Luca Ceresoli
2017-11-11 9:40 ` Arnout Vandecappelle
0 siblings, 1 reply; 3+ messages in thread
From: Luca Ceresoli @ 2017-11-10 22:16 UTC (permalink / raw)
To: buildroot
Several packages have a similar md5.c file, and each has a function
named byteReverse(). This generates link errors when building
statically ("multiple definition of `byteReverse'").
Fix by applying a patch from upstream:
https://trac.pjsip.org/repos/changeset/5688
Fixes:
http://autobuild.buildroot.org/results/5d7/5d72e0f8517a555399978d5a0e9f7efd0a278189/
http://autobuild.buildroot.org/results/c47/c47ccbb9b40011cf0d79c7040bed061ddefd9629/
http://autobuild.buildroot.org/results/419/419ab2c0e034cc68991281c51caa8271b0fadbab/
Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Cc: Adam Duskett <aduskett@gmail.com>
---
.../0001-Fixed-possible-function-name-clash.patch | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
create mode 100644 package/libpjsip/0001-Fixed-possible-function-name-clash.patch
diff --git a/package/libpjsip/0001-Fixed-possible-function-name-clash.patch b/package/libpjsip/0001-Fixed-possible-function-name-clash.patch
new file mode 100644
index 000000000000..80a05ab50a6c
--- /dev/null
+++ b/package/libpjsip/0001-Fixed-possible-function-name-clash.patch
@@ -0,0 +1,21 @@
+Index: pjlib-util/src/pjlib-util/md5.c
+===================================================================
+diff --git a/pjproject/pjlib-util/src/pjlib-util/md5.c b/pjproject/pjlib-util/src/pjlib-util/md5.c
+--- a/pjlib-util/src/pjlib-util/md5.c (revision 5687)
++++ b/pjlib-util/src/pjlib-util/md5.c (revision 5688)
+@@ -29,13 +29,13 @@
+ #ifndef HIGHFIRST
+ #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)
+ {
+ pj_uint32_t t;
+ do {
--
2.7.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [Buildroot] [PATCH] libpjsip: fix static build failures due to name clash
2017-11-10 22:16 [Buildroot] [PATCH] libpjsip: fix static build failures due to name clash Luca Ceresoli
@ 2017-11-11 9:40 ` Arnout Vandecappelle
2017-11-11 23:08 ` Luca Ceresoli
0 siblings, 1 reply; 3+ messages in thread
From: Arnout Vandecappelle @ 2017-11-11 9:40 UTC (permalink / raw)
To: buildroot
Hi Luca,
On 10-11-17 23:16, Luca Ceresoli wrote:
> Several packages have a similar md5.c file, and each has a function
> named byteReverse(). This generates link errors when building
> statically ("multiple definition of `byteReverse'").
>
> Fix by applying a patch from upstream:
> https://trac.pjsip.org/repos/changeset/5688
>
> Fixes:
> http://autobuild.buildroot.org/results/5d7/5d72e0f8517a555399978d5a0e9f7efd0a278189/
> http://autobuild.buildroot.org/results/c47/c47ccbb9b40011cf0d79c7040bed061ddefd9629/
> http://autobuild.buildroot.org/results/419/419ab2c0e034cc68991281c51caa8271b0fadbab/
>
> Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
> Cc: Adam Duskett <aduskett@gmail.com>
> ---
> .../0001-Fixed-possible-function-name-clash.patch | 21 +++++++++++++++++++++
> 1 file changed, 21 insertions(+)
> create mode 100644 package/libpjsip/0001-Fixed-possible-function-name-clash.patch
>
> diff --git a/package/libpjsip/0001-Fixed-possible-function-name-clash.patch b/package/libpjsip/0001-Fixed-possible-function-name-clash.patch
> new file mode 100644
> index 000000000000..80a05ab50a6c
> --- /dev/null
> +++ b/package/libpjsip/0001-Fixed-possible-function-name-clash.patch
> @@ -0,0 +1,21 @@
> +Index: pjlib-util/src/pjlib-util/md5.c
> +===================================================================
You forgot to add a commit message and your Sob to the patch.
Regards,
Arnout
> +diff --git a/pjproject/pjlib-util/src/pjlib-util/md5.c b/pjproject/pjlib-util/src/pjlib-util/md5.c
> +--- a/pjlib-util/src/pjlib-util/md5.c (revision 5687)
> ++++ b/pjlib-util/src/pjlib-util/md5.c (revision 5688)
> +@@ -29,13 +29,13 @@
> + #ifndef HIGHFIRST
> + #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)
> + {
> + pj_uint32_t t;
> + do {
>
--
Arnout Vandecappelle arnout at mind be
Senior Embedded Software Architect +32-16-286500
Essensium/Mind http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint: 7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Buildroot] [PATCH] libpjsip: fix static build failures due to name clash
2017-11-11 9:40 ` Arnout Vandecappelle
@ 2017-11-11 23:08 ` Luca Ceresoli
0 siblings, 0 replies; 3+ messages in thread
From: Luca Ceresoli @ 2017-11-11 23:08 UTC (permalink / raw)
To: buildroot
Hi,
On 11/11/2017 10:40, Arnout Vandecappelle wrote:
> Hi Luca,
>
> On 10-11-17 23:16, Luca Ceresoli wrote:
>> Several packages have a similar md5.c file, and each has a function
>> named byteReverse(). This generates link errors when building
>> statically ("multiple definition of `byteReverse'").
>>
>> Fix by applying a patch from upstream:
>> https://trac.pjsip.org/repos/changeset/5688
>>
>> Fixes:
>> http://autobuild.buildroot.org/results/5d7/5d72e0f8517a555399978d5a0e9f7efd0a278189/
>> http://autobuild.buildroot.org/results/c47/c47ccbb9b40011cf0d79c7040bed061ddefd9629/
>> http://autobuild.buildroot.org/results/419/419ab2c0e034cc68991281c51caa8271b0fadbab/
>>
>> Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
>> Cc: Adam Duskett <aduskett@gmail.com>
>> ---
>> .../0001-Fixed-possible-function-name-clash.patch | 21 +++++++++++++++++++++
>> 1 file changed, 21 insertions(+)
>> create mode 100644 package/libpjsip/0001-Fixed-possible-function-name-clash.patch
>>
>> diff --git a/package/libpjsip/0001-Fixed-possible-function-name-clash.patch b/package/libpjsip/0001-Fixed-possible-function-name-clash.patch
>> new file mode 100644
>> index 000000000000..80a05ab50a6c
>> --- /dev/null
>> +++ b/package/libpjsip/0001-Fixed-possible-function-name-clash.patch
>> @@ -0,0 +1,21 @@
>> +Index: pjlib-util/src/pjlib-util/md5.c
>> +===================================================================
>
> You forgot to add a commit message and your Sob to the patch.
My bad, I'm so comfortable with using 'git format-patch' to extract
patches that I forget the basics whenever I use a non-git repository...
Sorry about that, I just sent v2.
Bye,
--
Luca
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-11-11 23:08 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-10 22:16 [Buildroot] [PATCH] libpjsip: fix static build failures due to name clash Luca Ceresoli
2017-11-11 9:40 ` Arnout Vandecappelle
2017-11-11 23:08 ` 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.