diff options
author | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-08-03 15:39:41 +0000 |
---|---|---|
committer | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-08-03 15:39:41 +0000 |
commit | 29a052dfe668658cad0d33959784e5bda8f72a88 (patch) | |
tree | 66f640908c9fa44305153de3ba6451b90099383d /main/strcompat.c | |
parent | f63d1036662055f7effda28e97bcc8cf477e84f5 (diff) |
Apparently, some platforms don't have the index() function.
(closes issue #15639)
Reported by: nmav
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@210064 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/strcompat.c')
-rw-r--r-- | main/strcompat.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/main/strcompat.c b/main/strcompat.c index 243ef76cb..52347db17 100644 --- a/main/strcompat.c +++ b/main/strcompat.c @@ -84,6 +84,13 @@ int unsetenv(const char *name) } #endif +#ifndef HAVE_INDEX +char *index(const char *haystack, int needle) +{ + return strchr(haystack, needle); +} +#endif + #ifndef HAVE_STRCASESTR static char *upper(const char *orig, char *buf, int bufsize) { |