summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
Diffstat (limited to 'source4')
-rw-r--r--source4/scripting/ejs/smbcalls_string.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source4/scripting/ejs/smbcalls_string.c b/source4/scripting/ejs/smbcalls_string.c
index 2eb9a1b3f7..d5884cb00f 100644
--- a/source4/scripting/ejs/smbcalls_string.c
+++ b/source4/scripting/ejs/smbcalls_string.c
@@ -242,13 +242,14 @@ failed:
usage:
str = sprintf("i=%d s=%7s", 7, "foo");
*/
+typedef char *(*_asprintf_append_t)(char *, const char *, ...);
static int ejs_sprintf(MprVarHandle eid, int argc, struct MprVar **argv)
{
const char *format;
const char *p;
char *ret;
int a = 1;
- char *(*_asprintf_append)(char *, const char *, ...);
+ _asprintf_append_t _asprintf_append;
TALLOC_CTX *tmp_ctx;
if (argc < 1 || argv[0]->type != MPR_TYPE_STRING) {
ejsSetErrorMsg(eid, "sprintf invalid arguments");
@@ -259,7 +260,7 @@ static int ejs_sprintf(MprVarHandle eid, int argc, struct MprVar **argv)
ret = talloc_strdup(tmp_ctx, "");
/* avoid all the format string warnings */
- _asprintf_append = talloc_asprintf_append;
+ _asprintf_append = (_asprintf_append_t)talloc_asprintf_append;
/*
hackity hack ...