freebsd-ports/archivers/rpm4/files/extra-patch-rpmio_rpmsq.c
Johan van Selst 5ceaed7ee7 Fix build on FreeBSD 7.x
Reported by:	pav (pointyhat)
2012-06-17 21:00:21 +00:00

28 lines
523 B
C

--- rpmio/rpmsq.c.orig 2012-06-17 22:38:37.000000000 +0200
+++ rpmio/rpmsq.c 2012-06-17 22:38:29.000000000 +0200
@@ -39,6 +39,25 @@
{ -1, NULL },
};
+int
+sighold(int sig)
+{
+ sigset_t set;
+
+ sigemptyset(&set);
+ sigaddset(&set, sig);
+ return (_sigprocmask(SIG_BLOCK, &set, NULL));
+}
+int
+sigrelse(int sig)
+{
+ sigset_t set;
+
+ sigemptyset(&set);
+ sigaddset(&set, sig);
+ return (_sigprocmask(SIG_UNBLOCK, &set, NULL));
+}
+
int rpmsqIsCaught(int signum)
{
return sigismember(&rpmsqCaught, signum);