Ticket #4: rpm-sigaction.patch

File rpm-sigaction.patch, 1.4 kB (added by atkac, 3 years ago)
  • rpm-4.6.0-rc1/rpmio/rpmsq.c

    old new  
    152152 
    153153static struct rpmsig_s { 
    154154    int signum; 
    155     void (*handler) (int signum, void * info, void * context)
     155    rpmsqAction_t handler
    156156    int active; 
    157157    struct sigaction oact; 
    158158} rpmsigTbl[] = { 
     
    254254                    continue; 
    255255 
    256256                (void) sigemptyset (&sa.sa_mask); 
     257#ifdef SA_SIGINFO 
    257258                sa.sa_flags = SA_SIGINFO; 
     259#else 
     260                sa.sa_flags = 0; 
     261#endif 
    258262                sa.sa_sigaction = (void*)(handler != NULL ? handler : tbl->handler); 
    259263                if (sigaction(tbl->signum, &sa, &tbl->oact) < 0) { 
    260264                    SUB_REF(tbl); 
  • rpm-4.6.0-rc1/rpmio/rpmsq.h

    old new  
    77 */ 
    88 
    99#include <rpm/rpmsw.h> 
     10#include <signal.h> 
    1011 
    1112#ifdef __cplusplus 
    1213extern "C" { 
     
    2627 * @param info          (siginfo_t) signal info 
    2728 * @param context       signal context 
    2829 */ 
     30#ifdef SA_SIGINFO 
    2931typedef void (*rpmsqAction_t) (int signum, void * info, void * context); 
     32#else 
     33typedef void (*rpmsqAction_t) (int signum); 
     34#endif 
    3035 
    3136extern int _rpmsq_debug; 
    3237