newlib icon indicating copy to clipboard operation
newlib copied to clipboard

Undefined reference to flockfile/funlockfile

Open KKhanhH opened this issue 9 months ago • 0 comments

Bug Report

It looks like flock and related functions are declared in stdio.h, but there is no definition of these functions in the standard library implementation, causing a linker error to occur.

What's the issue you encountered?

Attempting to compile the latest version of fmt (currently 11.1.4) with a fmt::print statement causes this issue. Related issue here: https://github.com/fmtlib/fmt/issues/3829, fmt does check if these functions are declared and disables their calls using SFINAE, but since the declaration still exists this doesn't work properly.

How can the issue be reproduced?

Link to fmt library and call fmt::print, or attempt calling flock/flockfile/funlock file.

Environment?

Switch homebrew, devkita64 docker image.

Additional context?

N/A

KKhanhH avatar Mar 12 '25 10:03 KKhanhH