[MacPorts] #71931: geany build fails: portable-scandir.c: error: conflicting types for 'scandir'
MacPorts
noreply at macports.org
Sun Jan 26 18:54:53 UTC 2025
#71931: geany build fails: portable-scandir.c: error: conflicting types for
'scandir'
---------------------------+--------------------
Reporter: barracuda156 | Owner: (none)
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version: 2.10.5
Resolution: | Keywords:
Port: geany |
---------------------------+--------------------
Comment (by barracuda156):
Upstream said that code comes from `universal-ctags` (why doesn't `geany`
use the port?), and while `universal-ctags` builds with gcc-4.2 (which
issues a warning, but no error), it fails with gcc14:
{{{
CC main/libctags_a-portable-scandir.o
main/portable-scandir.c: In function 'scanDirectory':
main/portable-scandir.c:238:56: error: passing argument 3 of 'scandir'
from incompatible pointer type [-Wincompatible-pointer-types]
238 | return scandir (directory_name, array_pointer,
select_function, compare_function);
|
^~~~~~~~~~~~~~~
| |
| int
(*)(const struct dirent *)
In file included from /opt/local/include/LegacySupport/dirent.h:27,
from main/portable-dirent_p.h:5,
from main/routines_p.h:17,
from main/portable-scandir.c:112:
/usr/include/dirent.h:129:5: note: expected 'int (*)(struct dirent *)' but
argument is of type 'int (*)(const struct dirent *)'
129 | int (*)(struct dirent *), int (*)(const void *, const void *))
__DARWIN_INODE64(scandir);
| ^~~~~~~~~~~~~~~~~~~~~~~~
main/portable-scandir.c:238:73: error: passing argument 4 of 'scandir'
from incompatible pointer type [-Wincompatible-pointer-types]
238 | return scandir (directory_name, array_pointer,
select_function, compare_function);
|
^~~~~~~~~~~~~~~~
|
|
|
int (*)(const struct dirent **, const struct dirent **)
/usr/include/dirent.h:129:31: note: expected 'int (*)(const void *, const
void *)' but argument is of type 'int (*)(const struct dirent **, const
struct dirent **)'
129 | int (*)(struct dirent *), int (*)(const void *, const void *))
__DARWIN_INODE64(scandir);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
make[2]: *** [main/libctags_a-portable-scandir.o] Error 1
make[2]: *** Waiting for unfinished jobs....
}}}
--
Ticket URL: <https://trac.macports.org/ticket/71931#comment:3>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list