[exim] Exim 4.96 doesn't build on EL7/8/9, drtables.c:739:54…

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Christoph Schug
Date:  
À: exim-users
Sujet: [exim] Exim 4.96 doesn't build on EL7/8/9, drtables.c:739:54: error: ‘NUL’ undeclared
Hi,

I tried to build the new Exim 4.96 release but it fails with

drtables.c:739:54: error: ‘NUL’ undeclared (first use in this function); 
did you mean ‘NULL’?
      if (regex_match(regex_islookupmod, US name, len, NUL))
                                                       ^~~
                                                       NULL


This happens the same way on RHEL-derivates CentOS 7, AlmaLinux 8, and
AlmaLinux 9. Looking at the code I guess it should really read NULL
instead of NUL as suggested by the compiler (wonder on which platform
NUL is defined and where? Obviously others were able to build the
vanilla release).

Following patch fixes the issue for me.

--- src/drtables.c      2022-06-23 15:41:10.000000000 +0200
+++ src/drtables.c      2022-06-27 10:28:07.616955844 +0200
@@ -736,7 +736,7 @@
      {
      char * name = ent->d_name;
      int len = (int)strlen(name);
-    if (regex_match(regex_islookupmod, US name, len, NUL))
+    if (regex_match(regex_islookupmod, US name, len, NULL))
        {
        int pathnamelen = len + (int)strlen(LOOKUP_MODULE_DIR) + 2;
        void *dl;


Cheers,
Christoph