[Exim] Exim 4.21 breaks if errno is #defined as a macro

Página Inicial
Delete this message
Reply to this message
Autor: Andreas J Mueller
Data:  
Para: Michael Daly
CC: exim-users
Tópicos Antigos: re: [Exim] Exim 4.21 released
Assunto: [Exim] Exim 4.21 breaks if errno is #defined as a macro
Hi Michael!

> daemon.c:1144: warning: passing arg1 of 'check_special_case' makes
> pointer from integer without a cast
> daemon.c:1183: warning: passing arg1 of 'check_special_case' makes
> pointer from integer without a cast


If you receive these warnings, your OS has defined errno as a macro.
This is the case on SuSE Linux. You might use the following patch.

Andy

diff -urN exim-4.21.orig/src/daemon.c exim-4.21/src/daemon.c
--- src/daemon.c        Tue Aug 12 17:39:54 2003
+++ src/daemon.c        Thu Aug 14 15:35:15 2003
@@ -656,7 +656,7 @@
 */


static BOOL
-check_special_case(int errno, ip_address_item *addresses, ip_address_item *ipa,
+check_special_case(int eno, ip_address_item *addresses, ip_address_item *ipa,
BOOL back)
{
ip_address_item *ipa2;
@@ -667,7 +667,7 @@

 if (back)
   {
-  if (errno != EADDRINUSE || ipa->address[0] != 0) return FALSE;
+  if (eno != EADDRINUSE || ipa->address[0] != 0) return FALSE;
   for (ipa2 = addresses; ipa2 != ipa; ipa2 = ipa2->next)
     if (ipa2->address[1] == 0 && ipa2->port == ipa->port)
       return TRUE;