Skip to content

compile error compiling with -std=c23 - conflicting types for MXUserTryAcquireForceFail #750

Open
@heitbaum

Description

@heitbaum

Describe the bug

gcc-15 switched to -std=c23 by default:
https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=55e3bd376b2214e200fa76d12b67ff259b06c212

This causes the compile error

Reproduction steps

  1. Compile with gcc 15-20241117

Expected behavior

Successful compile

Additional context

libtool: compile:  /var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-13.0-devel/toolchain/bin/x86_64-libreelec-linux-gnu-gcc -DPACKAGE_NAME=\"open-vm-tools\" -DPACKAGE_TARNAME=\"open-vm-tools\" -DPACKAGE_VERSION=\"12.5.0\" "-DPACKAGE_STRING=\"open-vm-tools 12.5.0\"" -DPACKAGE_BUGREPORT=\"[email protected]\" -DPACKAGE_URL=\"\" -DX_DISPLAY_MISSING=1 -DHAVE_STDIO_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_STRINGS_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_UNISTD_H=1 -DHAVE_SYS_TIME_H=1 -DSTDC_HEADERS=1 -DPACKAGE=\"open-vm-tools\" -DVERSION=\"12.5.0\" -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DHAVE_FUSE3=1 -DFUSE_USE_VERSION=35 -DHAVE_DLOPEN=1 -DHAVE_ECVT=1 -DHAVE_FCVT=1 -DNO_DNET=1 -DHAVE_CRYPT_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_WCHAR_H=1 -DHAVE_SYS_IO_H=1 -DHAVE_SYS_PARAM_H=1 -DHAVE_SYS_SYSINFO_H=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_USER_H=1 -DHAVE_SYS_VFS_H=1 -DHAVE_UNWIND_H=1 -DHAVE__BOOL=1 -DHAVE_STDBOOL_H=1 -DHAVE_STRUCT_STAT_ST_RDEV=1 -DTIME_WITH_SYS_TIME=1 -DNO_XSM=1 -DNO_XCOMPOSITE=1 -DNO_MULTIMON=1 -I. -I/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-13.0-devel/build/open-vm-tools-12.5.0/open-vm-tools/lib/lock -I/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-13.0-devel/build/open-vm-tools-12.5.0/open-vm-tools/lib/include -I/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-13.0-devel/build/open-vm-tools-12.5.0/.x86_64-libreelec-linux-gnu/lib/include -DUSING_AUTOCONF=1 -DOPEN_VM_TOOLS -DNO_ICU -DVMX86_TOOLS -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -D_SVID_SOURCE -D_DEFAULT_SOURCE -DENABLE_RESOLUTIONKMS -march=x86-64-v3 -Wall -pipe -O2 -fomit-frame-pointer -DNDEBUG -Wall -Werror -Wno-pointer-sign -Wno-unused-value -fno-strict-aliasing -Wno-unknown-pragmas -Wno-uninitialized -Wno-deprecated-declarations -Wno-unused-const-variable -Wno-unused-but-set-variable -MT ulExcl.lo -MD -MP -MF .deps/ulExcl.Tpo -c /var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-13.0-devel/build/open-vm-tools-12.5.0/open-vm-tools/lib/lock/ulExcl.c  -fPIC -DPIC -o .libs/ulExcl.o
mv -f .deps/ulCondVar.Tpo .deps/ulCondVar.Plo
../../../open-vm-tools/lib/lock/ul.c:32:8: error: conflicting types for 'MXUserTryAcquireForceFail'; have 'Bool (*)(void)' {aka 'char (*)(void)'}
   32 | Bool (*MXUserTryAcquireForceFail)() = NULL;
      |        ^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../../../open-vm-tools/lib/lock/ul.c:24:
../../../open-vm-tools/lib/lock/ulInt.h:515:18: note: previous declaration of 'MXUserTryAcquireForceFail' with type 'Bool (*)(const char *)' {aka 'char (*)(const char *)'}
  515 |    extern Bool (*MXUserTryAcquireForceFail)(const char *name);
      |                  ^~~~~~~~~~~~~~~~~~~~~~~~~
make[3]: *** [Makefile:531: ul.lo] Error 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions