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