• Skip to sidebar navigation
  • Skip to content

Bitbucket

  • More
    ProjectsRepositories
  • Help
    • Online help
    • Learn Git
    • Welcome to Bitbucket
    • Keyboard shortcuts
  • Log In
Alexander Dahl
  1. Alexander Dahl

buildroot

Public
Actions
  • Clone
  • Compare

Learn more about cloning repositories

You have read-only access

Navigation
  • Source
  • Commits
  • Branches
  • All Branches Graph
  • Forks
  1. Alexander Dahl
  2. buildroot

Source

buildroot/package/proftpd/proftpd-0002-__mempcpy.patch
Peter KorsgaardPeter Korsgaard committed 108d50d50ca24 Apr 2014
Raw file
Source viewDiff to previous
 
1
[PATCH] pr_fnmatch.c: use mempcpy, not __mempcpy to fix linker issue with uClibc
2
​
3
The standard name (as checked for by configure) for the function is mempcpy,
4
not __mempcpy, so use that instead.
5
​
6
The existing code happens to work on glibc, as that provides an __mempcpy
7
alias, but other C libraries (E.G.  uClibc) don't:
8
​
9
./host/usr/bin/arm-linux-nm -D ./staging/lib/libuClibc-0.9.33.2.so | grep mempcpy
10
00035d2c W mempcpy
11
00036cf8 W wmempcpy
12
​
13
vs
14
​
15
./host/usr/bin/arm-none-linux-gnueabi-nm -D staging/lib/libc-2.18.so | grep mempcpy
16
0007d140 T mempcpy
17
0007d140 T __mempcpy
18
000e15f0 T __mempcpy_chk
19
00081828 T __mempcpy_small
20
00083148 W wmempcpy
21
000e4e3c T __wmempcpy_chk
22
​
23
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
24
---
25
 lib/pr_fnmatch.c      |    2 +-
26
 lib/pr_fnmatch_loop.c |    2 +-
27
 2 files changed, 2 insertions(+), 2 deletions(-)
28
​
29
Index: proftpd-1.3.4d/lib/pr_fnmatch.c
30
===================================================================
31
--- proftpd-1.3.4d.orig/lib/pr_fnmatch.c
32
+++ proftpd-1.3.4d/lib/pr_fnmatch.c
33
@@ -250,7 +250,7 @@
34
 # endif
35
 # define STRLEN(S) strlen (S)
36
 # define STRCAT(D, S) strcat (D, S)
37
-# define MEMPCPY(D, S, N) __mempcpy (D, S, N)
38
+# define MEMPCPY(D, S, N) mempcpy (D, S, N)
39
 # define MEMCHR(S, C, N) memchr (S, C, N)
40
 # define STRCOLL(S1, S2) strcoll (S1, S2)
41
 # include "pr_fnmatch_loop.c"
42
Index: proftpd-1.3.4d/lib/pr_fnmatch_loop.c
43
===================================================================
44
--- proftpd-1.3.4d.orig/lib/pr_fnmatch_loop.c
45
+++ proftpd-1.3.4d/lib/pr_fnmatch_loop.c
46
@@ -54,7 +54,7 @@
47
 /* Copy N bytes of SRC to DEST, return pointer to bytes after the
48
    last written byte.  */
49
 static void *
50
-__mempcpy (void *dest, const void *src, size_t n)
51
+mempcpy (void *dest, const void *src, size_t n)
52
 {
53
   return (char *) memcpy (dest, src, n) + n;
54
 }
  • Git repository management for enterprise teams powered by Atlassian Bitbucket
  • Atlassian Bitbucket v6.7.2
  • Documentation
  • Request a feature
  • About
  • Contact Atlassian
Atlassian

Everything looks good. We'll let you know here if there's anything you should know about.