summaryrefslogtreecommitdiff
path: root/rpmio
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2010-09-22 09:14:12 +0300
committerPanu Matilainen <pmatilai@redhat.com>2010-09-22 09:22:39 +0300
commit5d5cb6dce7cced15f01bc67948f7875c4dac7016 (patch)
tree0a39eca591dbba1bb5f4460d52abc74ebec3592a /rpmio
parent75a53aa616a3ec6d00a01186d266a4757e69f3c6 (diff)
downloadrpm-5d5cb6dce7cced15f01bc67948f7875c4dac7016.tar.gz
rpm-5d5cb6dce7cced15f01bc67948f7875c4dac7016.tar.bz2
rpm-5d5cb6dce7cced15f01bc67948f7875c4dac7016.zip
Make rpmsqAction compatible to sa_sigaction
Diffstat (limited to 'rpmio')
-rw-r--r--rpmio/rpmsq.c5
-rw-r--r--rpmio/rpmsq.h4
2 files changed, 4 insertions, 5 deletions
diff --git a/rpmio/rpmsq.c b/rpmio/rpmsq.c
index 95f5aaa1c..9f2c9b39d 100644
--- a/rpmio/rpmsq.c
+++ b/rpmio/rpmsq.c
@@ -179,8 +179,7 @@ int rpmsqIsCaught(int signum)
}
#ifdef SA_SIGINFO
-void rpmsqAction(int signum,
- void * info, void * context)
+void rpmsqAction(int signum, siginfo_t * info, void * context)
#else
void rpmsqAction(int signum)
#endif
@@ -265,7 +264,7 @@ int rpmsqEnable(int signum, rpmsqAction_t handler)
#else
sa.sa_flags = 0;
#endif
- sa.sa_sigaction = (void*)(handler != NULL ? handler : tbl->handler);
+ sa.sa_sigaction = (handler != NULL ? handler : tbl->handler);
if (sigaction(tbl->signum, &sa, &tbl->oact) < 0) {
SUB_REF(tbl);
break;
diff --git a/rpmio/rpmsq.h b/rpmio/rpmsq.h
index 0f8185639..b31afac93 100644
--- a/rpmio/rpmsq.h
+++ b/rpmio/rpmsq.h
@@ -31,7 +31,7 @@ typedef struct rpmsqElem * rpmsq;
* @param context signal context
*/
#ifdef SA_SIGINFO
-typedef void (*rpmsqAction_t) (int signum, void * info, void * context);
+typedef void (*rpmsqAction_t) (int signum, siginfo_t * info, void * context);
#else
typedef void (*rpmsqAction_t) (int signum);
#endif
@@ -74,7 +74,7 @@ int rpmsqIsCaught(int signum);
* @param context signal context
*/
#ifdef SA_SIGINFO
-void rpmsqAction(int signum, void * info, void * context);
+void rpmsqAction(int signum, siginfo_t * info, void * context);
#else
void rpmsqAction(int signum);
#endif