J. Thomsen:
> After upgrading from Fedora 34 to Fedora 35 I cannot compile Postfix (3.6.x) 
> due to this
> 
> [src/util]
> gcc -I. -I../../include -DHAS_DEV_URANDOM -DHAS_PCRE -UUSE_DYNAMIC_LIBS 
> -DDEF_SHLIB_DIR=\"no\"
> -UUSE_DYNAMIC_MAPS -Wmissing-prototypes -Wformat -Wno-comment -fno-common  -g 
> -O -I. -DLINUX5 -c
> attr_clnt.c
> 
> 
> In file included from attr_clnt.c:97:
> /usr/include/unistd.h:363:13: error: conflicting types for ?closefrom?; have 
> ?void(int)?
>   363 | extern void closefrom (int __lowfd) __THROW;
>       |             ^~~~~~~~~
> In file included from attr_clnt.c:96:
> ./sys_defs.h:1512:12: note: previous declaration of ?closefrom? with type 
> ?int(int)?
>  1512 | extern int closefrom(int);
>       |            ^~~~~~~~~

Glibc implemented closefrom() after Postfix 3.6 was released.

In sys_defs.h, under 

#if defined(LINUX2) || defined(LINUX3) || defined(LINUX4) || defined(LINUX5)

Add:

#if HAVE_GLIBC_API_VERSION_SUPPORT(2, 34)
#define HAS_CLOSEFROM
#endif

        Wietse

Reply via email to