aboutsummaryrefslogtreecommitdiffstats
path: root/package/diffutils/diffutils-2.8.1-__mempcpy.patch
blob: 94144c171303882fa5300f5e65a8d8620c13ae54 (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
45
46
47
[PATCH] diffutils: Don't use glibc specific __mempcpy

The configure script checks for mempcpy, but the code uses the (glibc
specific) __mempcpy instead. Fix it to use mempcpy which is more
portable.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>x
---
 lib/getopt.c |    4 ++--
 lib/regex.c  |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

Index: diffutils-2.8.1/lib/getopt.c
===================================================================
--- diffutils-2.8.1.orig/lib/getopt.c
+++ diffutils-2.8.1/lib/getopt.c
@@ -334,7 +334,7 @@ exchange (argv)
 	nonoption_flags_len = nonoption_flags_max_len = 0;
       else
 	{
-	  memset (__mempcpy (new_str, __getopt_nonoption_flags,
+	  memset (mempcpy (new_str, __getopt_nonoption_flags,
 			     nonoption_flags_max_len),
 		  '\0', top + 1 - nonoption_flags_max_len);
 	  nonoption_flags_max_len = top + 1;
@@ -445,7 +445,7 @@ _getopt_initialize (argc, argv, optstrin
 	      if (__getopt_nonoption_flags == NULL)
 		nonoption_flags_max_len = -1;
 	      else
-		memset (__mempcpy (__getopt_nonoption_flags, orig_str, len),
+		memset (mempcpy (__getopt_nonoption_flags, orig_str, len),
 			'\0', nonoption_flags_max_len - len);
 	    }
 	}
Index: diffutils-2.8.1/lib/regex.c
===================================================================
--- diffutils-2.8.1.orig/lib/regex.c
+++ diffutils-2.8.1/lib/regex.c
@@ -8314,7 +8314,7 @@ regerror (errcode, preg, errbuf, errbuf_
       if (msg_size > errbuf_size)
         {
 #if defined HAVE_MEMPCPY || defined _LIBC
-	  *((char *) __mempcpy (errbuf, msg, errbuf_size - 1)) = '\0';
+	  *((char *) mempcpy (errbuf, msg, errbuf_size - 1)) = '\0';
 #else
           memcpy (errbuf, msg, errbuf_size - 1);
           errbuf[errbuf_size - 1] = 0;