summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--rpmio/rpmsq.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/rpmio/rpmsq.c b/rpmio/rpmsq.c
index c979450b0..83c21b276 100644
--- a/rpmio/rpmsq.c
+++ b/rpmio/rpmsq.c
@@ -8,6 +8,7 @@
#include <sys/signal.h>
#include <errno.h>
#include <stdio.h>
+#include <stdlib.h>
#define ADD_REF(__tbl) (__tbl)->active++
#define SUB_REF(__tbl) --(__tbl)->active
@@ -61,7 +62,7 @@ void rpmsqAction(int signum)
int rpmsqEnable(int signum, rpmsqAction_t handler)
{
- int tblsignum = (signum >= 0 ? signum : -signum);
+ int tblsignum = abs(signum);
struct sigaction sa;
rpmsig tbl;
int ret = -1;