summaryrefslogtreecommitdiffstats
path: root/package/util-linux/0001-md5-declare-byteReverse-as-static.patch
blob: a5b290c4dbe67cdbecfa7f97d9f18ee061c3a601 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
From 424cee0f06ece9473786c189ab4741e1dea7061d Mon Sep 17 00:00:00 2001
From: Luca Ceresoli <luca@lucaceresoli.net>
Date: Tue, 7 Nov 2017 14:39: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

[Upstream patch: https://git.kernel.org/pub/scm/utils/util-linux/util-linux.git/commit/?id=424cee0f06ece9473786c189ab4741e1dea7061d]

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

OpenPOWER on IntegriCloud