Re: postfix-3.6.2 compilation fails with glibc-2.34
On Thu, Jul 29, 2021 at 3:15 PM Wietse Venema wrote: > > Wietse Venema: > > Wietse Venema: > > > Jaroslav Skarvada: > > > > Hi, > > > > > > > > glibc-2.34 introduced the closefrom function which causes postfix build > > > > to fail: > > > > > > > > In file included from ./vstream.h:22, > > > > from attr_print64.c:100: > > > > /usr/include/unistd.h:363:13: error: conflicting types for 'closefrom'; > > > > have 'vo > > > > 363 | extern void closefrom (int __lowfd) __THROW; > > > > | ^ > > > > In file included from attr_print64.c:92: > > > > ./sys_defs.h:1512:12: note: previous declaration of 'closefrom' with > > > > type 'int(i > > > > 1512 | extern int closefrom(int); > > > > |^ > > > > > > > > I think the def in the header src/util/sys_defs.h needs to be adjusted > > > > accordingly > > > > > > Please try adding > > > > > > #if HAVE_GLIBC_API_VERSION_SUPPORT(2, 34) > > > #define HAS_CLOSEFROM > > > #endif > > > > That should of course be: > > > > #if !HAVE_GLIBC_API_VERSION_SUPPORT(2, 34) > > #define HAS_CLOSEFROM > > #endif > > Gaak, ignore this incorrect correction. > > Wietse > Hi, I can confirm it works. Sorry for delay, stupid google marked the reply as a spam :) thanks & regards Jaroslav
Re: postfix-3.6.2 compilation fails with glibc-2.34
Wietse Venema: > Wietse Venema: > > Jaroslav Skarvada: > > > Hi, > > > > > > glibc-2.34 introduced the closefrom function which causes postfix build > > > to fail: > > > > > > In file included from ./vstream.h:22, > > > from attr_print64.c:100: > > > /usr/include/unistd.h:363:13: error: conflicting types for 'closefrom'; > > > have 'vo > > > 363 | extern void closefrom (int __lowfd) __THROW; > > > | ^ > > > In file included from attr_print64.c:92: > > > ./sys_defs.h:1512:12: note: previous declaration of 'closefrom' with type > > > 'int(i > > > 1512 | extern int closefrom(int); > > > |^ > > > > > > I think the def in the header src/util/sys_defs.h needs to be adjusted > > > accordingly > > > > Please try adding > > > > #if HAVE_GLIBC_API_VERSION_SUPPORT(2, 34) > > #define HAS_CLOSEFROM > > #endif > > That should of course be: > > #if !HAVE_GLIBC_API_VERSION_SUPPORT(2, 34) > #define HAS_CLOSEFROM > #endif Gaak, ignore this incorrect correction. Wietse
Re: postfix-3.6.2 compilation fails with glibc-2.34
Wietse Venema: > Jaroslav Skarvada: > > Hi, > > > > glibc-2.34 introduced the closefrom function which causes postfix build to > > fail: > > > > In file included from ./vstream.h:22, > > from attr_print64.c:100: > > /usr/include/unistd.h:363:13: error: conflicting types for 'closefrom'; > > have 'vo > > 363 | extern void closefrom (int __lowfd) __THROW; > > | ^ > > In file included from attr_print64.c:92: > > ./sys_defs.h:1512:12: note: previous declaration of 'closefrom' with type > > 'int(i > > 1512 | extern int closefrom(int); > > |^ > > > > I think the def in the header src/util/sys_defs.h needs to be adjusted > > accordingly > > Please try adding > > #if HAVE_GLIBC_API_VERSION_SUPPORT(2, 34) > #define HAS_CLOSEFROM > #endif That should of course be: #if !HAVE_GLIBC_API_VERSION_SUPPORT(2, 34) #define HAS_CLOSEFROM #endif Wietse > to the LINUX section in sys_defs.h, and let me know if that solves > the problem. > > Wietse >
Re: postfix-3.6.2 compilation fails with glibc-2.34
Jaroslav Skarvada: > Hi, > > glibc-2.34 introduced the closefrom function which causes postfix build to > fail: > > In file included from ./vstream.h:22, > from attr_print64.c:100: > /usr/include/unistd.h:363:13: error: conflicting types for 'closefrom'; have > 'vo > 363 | extern void closefrom (int __lowfd) __THROW; > | ^ > In file included from attr_print64.c:92: > ./sys_defs.h:1512:12: note: previous declaration of 'closefrom' with type > 'int(i > 1512 | extern int closefrom(int); > |^ > > I think the def in the header src/util/sys_defs.h needs to be adjusted > accordingly Please try adding #if HAVE_GLIBC_API_VERSION_SUPPORT(2, 34) #define HAS_CLOSEFROM #endif to the LINUX section in sys_defs.h, and let me know if that solves the problem. Wietse
postfix-3.6.2 compilation fails with glibc-2.34
Hi, glibc-2.34 introduced the closefrom function which causes postfix build to fail: In file included from ./vstream.h:22, from attr_print64.c:100: /usr/include/unistd.h:363:13: error: conflicting types for 'closefrom'; have 'vo 363 | extern void closefrom (int __lowfd) __THROW; | ^ In file included from attr_print64.c:92: ./sys_defs.h:1512:12: note: previous declaration of 'closefrom' with type 'int(i 1512 | extern int closefrom(int); |^ I think the def in the header src/util/sys_defs.h needs to be adjusted accordingly thanks & regards Jaroslav