Bug 1984045

Summary: postfix: FTBFS due to closefrom declaration conflict (glibc 2.34 related)
Product: Red Hat Enterprise Linux 9 Reporter: Florian Weimer <fweimer>
Component: postfixAssignee: Jaroslav Škarvada <jskarvad>
Status: CLOSED CURRENTRELEASE QA Contact: František Hrdina <fhrdina>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: CentOS StreamCC: bstinson, jwboyer, pgnet.dev
Target Milestone: betaKeywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: postfix-3.5.9-11.el9 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-12-07 21:44:43 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 1985918    

Description Florian Weimer 2021-07-20 13:51:32 UTC
postfix-3.5.9-9.el9 fails to rebuild with this compiler error:

gcc -I. -I../../include -fPIC -fcommon -DHAS_LDAP -DLDAP_DEPRECATED=1 -DUSE_LDAP_SASL -DHAS_LMDB -DHAS_PCRE -I/usr/include/pcre -DHAS_MYSQL -I/usr/include/mysql -DHAS_PGSQL -I/usr/include/pgsql -DHAS_SQLITE -DHAS_CDB -DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I/usr/include/sasl -DUSE_TLS -DDEF_CONFIG_DIR=\"/etc/postfix\" -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DNO_NIS -DHAS_DEV_URANDOM -DUSE_DYNAMIC_LIBS -DUSE_DYNAMIC_MAPS -Wmissing-prototypes -Wformat -Wno-comment -fcommon -fPIC  -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m32 -march=i686 -mtune=generic -msse2 -mfpmath=sse -mstackrealign -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fno-strict-aliasing -Wno-comment -I. -DLINUX4 -c attr_print0.c
In file included from attr_clnt.c:88:
/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:87:
./sys_defs.h:1512:12: note: previous declaration of 'closefrom' with type 'int(int)'
 1512 | extern int closefrom(int);
      |            ^~~~~~~~~


closefrom is a new function in glibc 2.34. It follows the Solaris precedent, so it returns void (not int). At the minimum, Postfix needs to adjust its return type. The only caller of the function does not use the returned value anyway.

Comment 1 Jaroslav Škarvada 2021-08-02 22:08:44 UTC
Already fixed in Fedora and notified upstream.