Package: pidgin-festival
Version: 2.4-2
Severity: important
Tags: patch
User: debian-h...@lists.debian.org
Usertags: hurd

Hi,

currently[1], pidgin-festival does not compile on GNU/Hurd.

In src/festival.c, plugin_load function, there's a redeclaration of the
errno variable; although, it seems that code should rather look at the
return value of the popen invocation to check whether it succeeded,
instead of errno (since it may also not be set[2]).

The attached patch fixes the check of popen errors, removing also a
pclose invocation that is pointless (since "festival_pf" would be NULL
there).

I just reported the issue also upstream[3], although upstream does not
seem that active...

[1] 
https://buildd.debian.org/status/fetch.php?pkg=pidgin-festival&arch=hurd-i386&ver=2.4-2%2Bb1&stamp=1339115060
[2] http://pubs.opengroup.org/onlinepubs/9699919799/functions/popen.html
[3] 
https://sourceforge.net/tracker/?func=detail&aid=3540911&group_id=203019&atid=983912

Thanks,
-- 
Pino
--- a/src/festival.c
+++ b/src/festival.c
@@ -534,11 +534,9 @@ plugin_load(PurplePlugin *plugin) {
   snprintf(proc,1024, "%s %s", snd((char *)purple_prefs_get_string("/pidgin/sound/method")), line);
   purple_debug(PURPLE_DEBUG_INFO, "pidgin festival","%s", proc);
 
-  int errno=0;
   festival_pf= popen(proc,"w");
 
-  if(errno) {
-    pclose(festival_pf);
+  if(!festival_pf) {
     return FALSE;
   }
 

Reply via email to