[RFC][PATCH] dl-string.h: define _dl_strchr and _dl_strstr if not IS_IN_rtld

Junling Zheng <[email protected]>
Newsgroups gmane.comp.lib.uclibc.general
Message-ID <[email protected]>
We should define _dl_strchr and _dl_strstr when not defining IS_IN_rtld.
Otherwise, if someone use _dl_strchr or _dl_strstr in the ldso/ldso/dl-
elf.c, libdl.a will lack the declaration of '_dl_strchr' or '_dl_strstr',
and there will be an compiling error like the following:

  dl-elf.c:156: undefined reference to `_dl_strchr'

So, add the definition of _dl_strchr and _dl_strstr.

Signed-off-by: Junling Zheng <[email protected]>
---
 ldso/include/dl-string.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/ldso/include/dl-string.h b/ldso/include/dl-string.h
index aacad10..14ae617 100644
--- a/ldso/include/dl-string.h
+++ b/ldso/include/dl-string.h
@@ -204,7 +204,9 @@ static __always_inline char * _dl_get_last_path_component(char *path)
 # define _dl_strcat strcat
 # define _dl_strcpy strcpy
 # define _dl_strcmp strcmp
+# define _dl_strchr strchr
 # define _dl_strrchr strrchr
+# define _dl_strstr strstr
 # define _dl_memcpy memcpy
 # define _dl_memcmp memcmp
 # define _dl_memset memset
-- 
1.8.3.4
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.