Control: tags -1 patch

Hi,

On Mon, 11 Sep 2017 10:56:18 -0400 "Aaron M. Ucko" <u...@debian.org> wrote:
> Source: ecflow
> Version: 4.6.1-2
> Severity: important
> Tags: upstream
> Justification: fails to build from source
> 
> Builds of ecflow on architectures (so far, mips and mips64el) on which
> struct sigaction's first member isn't a union have been failing:
> 
>   /<<PKGBUILDDIR>>/view/src/logsvr.cc:111:35: error: braces around scalar 
> initializer for type 'int'
>     struct sigaction sa = { { 0, },  };
>   
> Please account for this possibility, perhaps by explicitly assigning
> to sigaction's fields.  (I'd also recommend using the symbolic name
> SIG_DFL here.)

I think the best way is to use the initialization "{ 0 }". This is
exactly equivalent to the above code except that it does not assume that
the first field of sigaction is an aggregate.

I've attached a patch which does this.

Thanks,
James
--- a/view/src/logsvr.cc
+++ b/view/src/logsvr.cc
@@ -108,7 +108,7 @@ void logsvr::connect(std::string host,in
 	char* timeout = getenv ("ECFLOWVIEW_LOGTIMEOUT");
 	int time_out = timeout ? atoi(timeout) : 3;
 
-	struct sigaction sa = { { 0, },  };
+	struct sigaction sa = { 0 };
 	struct sigaction old;
 	sa.sa_handler = catch_alarm;
 	sigemptyset(&sa.sa_mask);

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to