]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Only set SA_RESTART if it is defined
authorJoel Rosdahl <joel@rosdahl.net>
Fri, 6 May 2016 20:31:39 +0000 (22:31 +0200)
committerJoel Rosdahl <joel@rosdahl.net>
Fri, 6 May 2016 20:31:39 +0000 (22:31 +0200)
As suggested by Igor Rondarev to make ccache buildable on QNX.

NEWS.txt
ccache.c

index a0fee0e69f380608ad8edd51e6fc686b1c232dc4..18c7c540c05b11c05523d14a1adf356ee4910a86 100644 (file)
--- a/NEWS.txt
+++ b/NEWS.txt
@@ -2,6 +2,15 @@ ccache news
 ===========
 
 
+Unreleased 3.2.6
+----------------
+
+Bug fixes
+~~~~~~~~~
+
+- Fixed build problem on QNX, which lacks ``SA_RESTART''.
+
+
 ccache 3.2.5
 ------------
 Release date: 2016-04-17
index 544c3973f53afd230296b1f37ac53edac36f4ba6..b61fac4cbe89f1d94f7851b1fce9af806f1d0aea 100644 (file)
--- a/ccache.c
+++ b/ccache.c
@@ -402,7 +402,9 @@ register_signal_handler(int signum)
        memset(&act, 0, sizeof(act));
        act.sa_handler = signal_handler;
        act.sa_mask = fatal_signal_set;
+#ifdef SA_RESTART
        act.sa_flags = SA_RESTART;
+#endif
        sigaction(signum, &act, NULL);
 }