From 5ea937f787bf15c8166bffa3b0bdd6730c21ecc3 Mon Sep 17 00:00:00 2001 From: Guillaume BIENKOWSKI Date: Thu, 5 Dec 2013 18:00:33 +0100 Subject: [PATCH] Fix compilation issue in console.c for Mac --- console/commands.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/console/commands.c b/console/commands.c index c4e70ba02..ba2f1dc3c 100644 --- a/console/commands.c +++ b/console/commands.c @@ -2109,7 +2109,13 @@ static int lpc_cmd_speak(LinphoneCore *lc, char *args){ memset(voice,0,sizeof(voice)); sscanf(args,"%63s",voice); sentence=args+strlen(voice); + +#ifdef __APPLE__ + wavfile=mktemp("/tmp/linphonec-espeak-XXXXXX"); +#else wavfile=tempnam("/tmp/","linphonec-espeak-"); +#endif + snprintf(cl,sizeof(cl),"espeak -v %s -s 100 -w %s --stdin",voice,wavfile); file=popen(cl,"w"); if (file==NULL){