[EXIM] PATCH for glibc

Página superior
Eliminar este mensaje
Responder a este mensaje
Autor: Neal Becker
Fecha:  
A: exim-users
Asunto: [EXIM] PATCH for glibc
The following patch is needed to build exim-1.82 on linux glibc2.0.6.
This is the same patch I sent before for smtp_in.c, which fixes the
problem with ip_options:

--- src/smtp_in.c    1998/02/07 15:45:05    1.1
+++ src/smtp_in.c    1998/02/07 15:46:38
@@ -711,9 +711,15 @@
     if (log_ip_options || kill_ip_options || refuse_ip_options)
       {
       #ifdef LINUX_IP_OPTIONS
+      #if (__GLIBC__ < 2)
       int optlen = sizeof(struct ip_options) + MAX_IPOPTLEN;
       struct ip_options *ipopt = store_malloc(optlen);
       #else
+      struct ip_opts ipoptblock;
+      struct ip_opts *ipopt = &ipoptblock;
+      int optlen = sizeof(ipoptblock);
+      #endif
+      #else
       struct ipoption ipoptblock;
       struct ipoption *ipopt = &ipoptblock;
       int optlen = sizeof(ipoptblock);
@@ -743,7 +749,11 @@
           struct in_addr addr;


           #ifdef LINUX_IP_OPTIONS
+      #if (__GLIBC__ < 2)
           unsigned char *optstart = (unsigned char *)(ipopt->__data);
+      #else
+      unsigned char *optstart = (unsigned char *)(ipopt->ip_opts);
+      #endif
           #else
           unsigned char *optstart = (unsigned char *)(ipopt->ipopt_list);
           #endif
@@ -768,7 +778,11 @@
           case IPOPT_LSRR:
               sprintf(p, " %s [@%s", (*opt == IPOPT_SSRR)? "SSRR" : "LSRR",
               #ifdef LINUX_IP_OPTIONS
+          #if (__GLIBC__ < 2)
                 inet_ntoa(*((struct in_addr *)(&(ipopt->faddr)))));
+          #else
+            inet_ntoa(ipopt->ip_dst));
+          #endif
               #else
                 inet_ntoa(ipopt->ipopt_dst));
               #endif


--
*** Exim information can be found at http://www.exim.org/ ***