[MacPorts] #69459: man @1.6g_2+xcode build failure: type name requires a specifier or qualifier
MacPorts
noreply at macports.org
Wed Jan 29 08:30:08 UTC 2025
#69459: man @1.6g_2+xcode build failure: type name requires a specifier or
qualifier
---------------------+--------------------
Reporter: jf | Owner: (none)
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version: 2.9.1
Resolution: | Keywords:
Port: man |
---------------------+--------------------
Comment (by rswail):
This bug is related to the declaration of `uid_t` (and others), in the
configuration scripts.
The conf_script is constructed with the following line in it:
`s, at DEFS@, -DUSG -Duid_t= -Dgid_t= -DALLOCA_MISSING -DNONLS -DNOGETOPT
-DDO_COMPRESS,`
That file is created by the configure script which has the following code
in it:
{{{
echo checking whether sys/types.h defines uid_t
echo '#include <sys/types.h>
#include <stdlib.h>
main() { uid_t x; exit(0); }' > conftest.c
eval $compile
if test -s conftest && ./conftest 2>/dev/null; then :
else
uid_t=`awk '/pw_uid;/ {print $1}' $INCLUDEDIR/pwd.h`
DEFS="$DEFS -Duid_t=${uid_t} -Dgid_t=${uid_t}"
fi
rm -f conftest conftest.c
}}}
That fails in clang with the following error:
{{{
conftest.c:3:1: error: type specifier missing, defaults to 'int'; ISO C99
and later do not support implicit int [-Wimplicit-int]
3 | main() { uid_t x; exit(0); }
| ^
| int
1 error generated.
}}}
The patch to the original configure script is by patching with (sed):
`s,^main(),int main(),`
which will correct the 7 uses of this construct in the original configure
script.
--
Ticket URL: <https://trac.macports.org/ticket/69459#comment:6>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list