Bug#893485: gjs: FTBFS on mips* - error: braces around scalar initializer for type 'int'

2018-03-20 Thread James Cowgill
Hi,

On 19/03/18 12:52, Jeremy Bicha wrote:
> On Mon, Mar 19, 2018 at 6:28 AM, James Cowgill  wrote:
>> I've attached a patch to fix this.
> 
> I really appreciate your patch! Are you interested in submitting this
> as a merge proposal upstream?
> 
> https://gitlab.gnome.org/GNOME/gjs

Yeah I'll try and submit it upstream today.

James



signature.asc
Description: OpenPGP digital signature


Bug#893485: gjs: FTBFS on mips* - error: braces around scalar initializer for type 'int'

2018-03-19 Thread Jeremy Bicha
On Mon, Mar 19, 2018 at 6:28 AM, James Cowgill  wrote:
> I've attached a patch to fix this.

I really appreciate your patch! Are you interested in submitting this
as a merge proposal upstream?

https://gitlab.gnome.org/GNOME/gjs

Thanks,
Jeremy Bicha



Bug#893485: gjs: FTBFS on mips* - error: braces around scalar initializer for type 'int'

2018-03-19 Thread James Cowgill
Source: gjs
Version: 1.52.0-1
Severity: serious
Tags: sid buster patch

Hi,

gjs FTBFS on mips* with this error:
> gjs/profiler.cpp: In function 'void gjs_profiler_start(GjsProfiler*)':
> gjs/profiler.cpp:380:33: error: braces around scalar initializer for type 
> 'int'
>  struct sigaction sa = {{ 0 }};
>  ^
> make[2]: *** [Makefile:2422: gjs/libgjs_la-profiler.lo] Error 1

This happens because sigaction has an unusual layout on mips where the
first field is sa_flags instead of the usual sa_handler/sa_sigaction union.

I've attached a patch to fix this.

Thanks,
James
Description: Fix FTBFS on mips*
 Do not assume the first field of sigaction is a struct or union.
Author: James Cowgill 
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/gjs/profiler.cpp
+++ b/gjs/profiler.cpp
@@ -377,9 +377,9 @@ gjs_profiler_start(GjsProfiler *self)
 
 g_return_if_fail(!self->capture);
 
-struct sigaction sa = {{ 0 }};
-struct sigevent sev = {{ 0 }};
-struct itimerspec its = {{ 0 }};
+struct sigaction sa = { 0 };
+struct sigevent sev = { 0 };
+struct itimerspec its = { 0 };
 struct itimerspec old_its;
 
 GjsAutoChar path = g_strdup(self->filename);
@@ -491,7 +491,7 @@ gjs_profiler_stop(GjsProfiler *self)
 
 #ifdef ENABLE_PROFILER
 
-struct itimerspec its = {{ 0 }};
+struct itimerspec its = { 0 };
 timer_settime(self->timer, 0, , nullptr);
 timer_delete(self->timer);
 


signature.asc
Description: OpenPGP digital signature