ext/RMagick/rmimage.c in rmagick-4.1.1 vs ext/RMagick/rmimage.c in rmagick-4.1.2
- old
+ new
@@ -11047,11 +11047,11 @@
* @see Image_read
* @see Image_ping
* @see array_from_images
*/
-#if defined(__APPLE__)
+#if defined(__APPLE__) || defined(__FreeBSD__)
void sig_handler(int sig ATTRIBUTE_UNUSED)
{
}
#endif
@@ -11095,11 +11095,11 @@
SetImageInfoFile(info, NULL);
}
exception = AcquireExceptionInfo();
-#if defined(__APPLE__)
+#if defined(__APPLE__) || defined(__FreeBSD__)
struct sigaction act, oldact;
act.sa_handler = sig_handler;
act.sa_flags = SA_RESTART;
if (sigaction(SIGCHLD, &act, &oldact) < 0)
{
@@ -11107,10 +11107,10 @@
}
#endif
images = (reader)(info, exception);
-#if defined(__APPLE__)
+#if defined(__APPLE__) || defined(__FreeBSD__)
if (sigaction(SIGCHLD, &oldact, NULL) < 0)
{
rb_sys_fail("sigaction");
}
#endif