Fedora Account System
Red Hat Associate
Red Hat Customer
ac_cube_posix_functions.m4 uses AC_CHECK_DECLS (which implies AC_INCLUDES_DEFAULT headers) to check for gethostid, gethosname, followed by a check for link-time availability using AC_LINK_IFELSE (not AC_CHECK_FUNC). The way AC_LINK_IFELSE used, AC_INCLUDES_DEFAULT headers are not applied, so the condition #if !HAVE_DECL_GETHOSTID long gethostid(void); #endif does not give the right result because <unistd.h> is not included at this point even though HAVE_DECL_GETHOSTID is defined. This causes problems with future compilers which do not support implicit function declarations. Filing this here because upstream does not seem to have a public bug tracker.
I've forwarded it to the maintainers, thanks. Is this just a problem for gcc 14, i.e. not imminent?
(In reply to Dave Love from comment #1) > I've forwarded it to the maintainers, thanks. Okay, then I'll hold off sending my message. I'm testing a patch. > Is this just a problem for gcc 14, i.e. not imminent? I want to add approximating -Werror flags to the default flags fairly soon, certainly before GCC 14 lands in December or so. For upstream, it might be more pressing because they also have users with Clang, which has already made the switch.
Created attachment 1952064 [details] cube-configure-c99.patch This patch seems to work. Upstream may need a different approach (e.g. for systems which do not have <unistd.h>).