summaryrefslogtreecommitdiff
path: root/strcompat.c
diff options
context:
space:
mode:
Diffstat (limited to 'strcompat.c')
-rw-r--r--strcompat.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/strcompat.c b/strcompat.c
index 2efdb03d5..1319fa26c 100644
--- a/strcompat.c
+++ b/strcompat.c
@@ -3,8 +3,11 @@
#include <sys/types.h>
#include <stdio.h>
+#include "asterisk.h"
+
#include "asterisk/compat.h"
+#ifndef HAVE_STRSEP
char* strsep(char** str, const char* delims)
{
char* token;
@@ -27,9 +30,9 @@ char* strsep(char** str, const char* delims)
*str=NULL;
return token;
}
+#endif
-
-
+#ifndef HAVE_SETENV
int setenv(const char *name, const char *value, int overwrite)
{
unsigned char *buf;
@@ -46,9 +49,11 @@ int setenv(const char *name, const char *value, int overwrite)
return putenv(buf);
}
+#endif
+#ifndef HAVE_UNSETENV
int unsetenv(const char *name)
{
return setenv(name, "", 0);
}
-
+#endif