[MacPorts] #69790: pulseaudio @17.0_0: error: incompatible function pointer types passing 'int (const struct dirent *)' to parameter of type 'int (*)(struct dirent *)' [-Wincompatible-function-pointer-types]

MacPorts noreply at macports.org
Sat Oct 12 06:04:07 UTC 2024


#69790: pulseaudio @17.0_0: error: incompatible function pointer types passing 'int
(const struct dirent *)' to parameter of type 'int (*)(struct dirent *)'
[-Wincompatible-function-pointer-types]
-------------------------+----------------------
  Reporter:  RobK88      |      Owner:  Ionic
      Type:  defect      |     Status:  assigned
  Priority:  Normal      |  Milestone:
 Component:  ports       |    Version:  2.9.3
Resolution:              |   Keywords:  lion
      Port:  pulseaudio  |
-------------------------+----------------------

Comment (by barracuda156):

 Same error with gcc:
 {{{
 :notice:build --->  Building pulseaudio
 :debug:build Executing org.macports.build (pulseaudio)
 :debug:build Environment:
 :debug:build CC_PRINT_OPTIONS='YES'
 :debug:build
 CC_PRINT_OPTIONS_FILE='/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_audio_pulseaudio/pulseaudio/work/.CC_PRINT_OPTIONS'
 :debug:build CPATH='/opt/local/include'
 :debug:build DEVELOPER_DIR='/Developer'
 :debug:build LIBRARY_PATH='/opt/local/lib'
 :debug:build MACOSX_DEPLOYMENT_TARGET='10.5'
 :debug:build SOURCE_DATE_EPOCH='1728661324'
 :info:build Executing:  cd
 "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_audio_pulseaudio/pulseaudio/work/build"
 && /opt/local/bin/ninja -j1 -v
 :debug:build system:  cd
 "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_audio_pulseaudio/pulseaudio/work/build"
 && /opt/local/bin/ninja -j1 -v
 :info:build [1/424] /opt/local/bin/gcc-mp-14
 -Isrc/libpulsecommon-17.0.dylib.p -I. -I../pulseaudio-17.0 -Isrc
 -I../pulseaudio-17.0/src -I/opt/local/include/opus
 -I/opt/local/include/dbus-1.0 -I/opt/local/lib/dbus-1.0/include
 -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include
 -I/opt/local/include -fdiagnostics-color=always -Wall -Winvalid-pch
 -std=gnu11 -O0 -g -pipe -Os -arch ppc -DHAVE_CONFIG_H -D_GNU_SOURCE -MD
 -MQ src/libpulsecommon-17.0.dylib.p/pulsecore_conf-parser.c.o -MF
 src/libpulsecommon-17.0.dylib.p/pulsecore_conf-parser.c.o.d -o
 src/libpulsecommon-17.0.dylib.p/pulsecore_conf-parser.c.o -c
 ../pulseaudio-17.0/src/pulsecore/conf-parser.c
 :info:build FAILED: src/libpulsecommon-17.0.dylib.p/pulsecore_conf-
 parser.c.o
 :info:build /opt/local/bin/gcc-mp-14 -Isrc/libpulsecommon-17.0.dylib.p -I.
 -I../pulseaudio-17.0 -Isrc -I../pulseaudio-17.0/src
 -I/opt/local/include/opus -I/opt/local/include/dbus-1.0
 -I/opt/local/lib/dbus-1.0/include -I/opt/local/include/glib-2.0
 -I/opt/local/lib/glib-2.0/include -I/opt/local/include -fdiagnostics-
 color=always -Wall -Winvalid-pch -std=gnu11 -O0 -g -pipe -Os -arch ppc
 -DHAVE_CONFIG_H -D_GNU_SOURCE -MD -MQ src/libpulsecommon-17.0.dylib.p
 /pulsecore_conf-parser.c.o -MF src/libpulsecommon-17.0.dylib.p
 /pulsecore_conf-parser.c.o.d -o src/libpulsecommon-17.0.dylib.p
 /pulsecore_conf-parser.c.o -c ../pulseaudio-17.0/src/pulsecore/conf-
 parser.c
 :info:build ../pulseaudio-17.0/src/pulsecore/conf-parser.c: In function
 'pa_config_parse':
 :info:build ../pulseaudio-17.0/src/pulsecore/conf-parser.c:268:41: error:
 passing argument 3 of 'scandir' from incompatible pointer type
 [-Wincompatible-pointer-types]
 :info:build   268 |         n = scandir(dir_name, &entries, conf_filter,
 alphasort);
 :info:build       |                                         ^~~~~~~~~~~
 :info:build       |                                         |
 :info:build       |                                         int (*)(const
 struct dirent *)
 :info:build In file included from ../pulseaudio-17.0/src/pulsecore/conf-
 parser.c:24:
 :info:build /usr/include/dirent.h:119:5: note: expected 'int (*)(struct
 dirent *)' but argument is of type 'int (*)(const struct dirent *)'
 :info:build   119 |     int (*)(struct dirent *), int (*)(const void *,
 const void *)) __DARWIN_INODE64(scandir);
 :info:build       |     ^~~~~~~~~~~~~~~~~~~~~~~~
 :info:build ninja: build stopped: subcommand failed.
 :info:build Command failed:  cd
 "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_audio_pulseaudio/pulseaudio/work/build"
 && /opt/local/bin/ninja -j1 -v
 :info:build Exit code: 1
 }}}

 P. S. Notice, the flag must be different.

-- 
Ticket URL: <https://trac.macports.org/ticket/69790#comment:8>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list