[gjs: 1/2] profiler: Don't assume layout of struct sigaction



commit d0275c5600be183f67983d9d6cf74019542b76ed
Author: James Cowgill <jcowgill jcowgill uk>
Date:   Tue Mar 20 11:10:57 2018 +0000

    profiler: Don't assume layout of struct sigaction
    
    This commit fixes a build failure on mips* which has an unusual layout
    of struct sigaction where the first field is sa_flags instead of the
    usual sa_handler/sa_sigaction union.

 gjs/profiler.cpp | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/gjs/profiler.cpp b/gjs/profiler.cpp
index 5749fcf..1b6817d 100644
--- 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, &its, nullptr);
     timer_delete(self->timer);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]