From: Joel Rosdahl Date: Fri, 6 May 2016 20:31:39 +0000 (+0200) Subject: Only set SA_RESTART if it is defined X-Git-Tag: v3.2.6~9 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9bfc21b24ef4e5657c9e1b94854ac0d77f0039f1;p=thirdparty%2Fccache.git Only set SA_RESTART if it is defined As suggested by Igor Rondarev to make ccache buildable on QNX. --- diff --git a/NEWS.txt b/NEWS.txt index a0fee0e69..18c7c540c 100644 --- 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 diff --git a/ccache.c b/ccache.c index 544c3973f..b61fac4cb 100644 --- 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); }