← Back to team overview

maria-developers team mailing list archive

MariaDB 10.4 on AIX. Issue with: #define SI_KERNEL in include/my_pthread.h

 

Hi,

In my environment (AIX & MariaDB v10.4.3 or 10.4.4), I have:

include/config.h:      #define HAVE_SIGWAITINFO 1

and thus in the file :

include/my_pthread.h : 
   static inline int my_sigwait(sigset_t *set, int *sig, int *code)
   {
    #ifdef HAVE_SIGWAITINFO
      siginfo_t siginfo;
      *sig= sigwaitinfo(set, &siginfo);
      *code= siginfo.si_code;
      return *sig < 0 ?  errno : 0;
    #else
    #define SI_KERNEL 128
      *code= 0;
      return sigwait(set, sig);
    #endif
    }

the SI_KERNEL macro is NOT defined.



Then, I get the following error at compilation:

mariadb-10.4.3/sql/mysqld.cc:3272:36: error: 'SI_KERNEL' was not declared in this scope
       if (!abort_loop && origin != SI_KERNEL)


The attached patch is an easy work-around for fixing the issue. However, it may not be the perfect appropriate change.
Since I do not master MariaDB, I'd like someone to propose a fully correct fix.


Thanks/Regards,

Tony Reix

tony.reix@xxxxxxxx

ATOS / Bull SAS
ATOS Expert
IBM Coop Architect & Technical Leader

Office : +33 (0) 4 76 29 72 67
1 rue de Provence - 38432 Échirolles - France
www.atos.net
--- ./sql/mysqld.cc.ORIGIN	2019-04-15 18:35:45 -0500
+++ ./sql/mysqld.cc	2019-04-12 17:09:32 -0500
@@ -3269,6 +3269,7 @@
       }
       break;
     case SIGHUP:
+#define SI_KERNEL 128
       if (!abort_loop && origin != SI_KERNEL)
       {
         int not_used;