summaryrefslogtreecommitdiffstats
path: root/libc/misc/regex/regex_old.c
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2009-10-22 01:04:07 -0400
committerAustin Foxley <austinf@cetoncorp.com>2009-11-09 15:43:13 -0800
commit90edcff5979e74581a713899b35eb54517f80de6 (patch)
treebeb8c16dc1fdf9ffd6b30592228a0fba100f51df /libc/misc/regex/regex_old.c
parentc7e422bb73ab4ee374817fc8e51d49f4964745ca (diff)
downloaduClibc-alpine-90edcff5979e74581a713899b35eb54517f80de6.tar.bz2
uClibc-alpine-90edcff5979e74581a713899b35eb54517f80de6.tar.xz
regex: call memcpy() ourselves
Call the hidden memcpy() ourselves otherwise gcc will emit a call to the public memcpy() which goes through the PLT. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
Diffstat (limited to 'libc/misc/regex/regex_old.c')
-rw-r--r--libc/misc/regex/regex_old.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libc/misc/regex/regex_old.c b/libc/misc/regex/regex_old.c
index 3550698d3..cbfb7ae7c 100644
--- a/libc/misc/regex/regex_old.c
+++ b/libc/misc/regex/regex_old.c
@@ -8085,7 +8085,8 @@ regexec (
int len = strlen (string);
boolean want_reg_info = !preg->no_sub && nmatch > 0;
- private_preg = *preg;
+ /* use hidden memcpy() ourselves rather than gcc calling public memcpy() */
+ memcpy(&private_preg, preg, sizeof(*preg));
private_preg.not_bol = !!(eflags & REG_NOTBOL);
private_preg.not_eol = !!(eflags & REG_NOTEOL);