From: Eric Andersen Date: Sat, 13 Apr 2002 13:02:03 +0000 (-0000) Subject: Stupid gcc always includes its own builtin strlen()... X-Git-Tag: 0_60_3~29 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=db7d5fca5f6a98a68a16bbea7cd71593791c43dc;p=oweals%2Fbusybox.git Stupid gcc always includes its own builtin strlen()... --- diff --git a/include/libbb.h b/include/libbb.h index cf593d65c..40cff8b4b 100644 --- a/include/libbb.h +++ b/include/libbb.h @@ -293,4 +293,8 @@ int is_in_ino_dev_hashtable(const struct stat *statbuf, char **name); void add_to_ino_dev_hashtable(const struct stat *statbuf, const char *name); void reset_ino_dev_hashtable(void); +/* Stupid gcc always includes its own builtin strlen()... */ +extern size_t xstrlen(const char *string); +#define strlen(x) xstrlen(x) + #endif /* __LIBCONFIG_H__ */ diff --git a/libbb/xfuncs.c b/libbb/xfuncs.c index 57c698079..acd4d6985 100644 --- a/libbb/xfuncs.c +++ b/libbb/xfuncs.c @@ -85,6 +85,12 @@ FILE *xfopen(const char *path, const char *mode) return fp; } +/* Stupid gcc always includes its own builtin strlen()... */ +size_t xstrlen(const char *string) +{ + return(strlen(string)); +} + /* END CODE */ /* Local Variables: