gulrak / filesystem

An implementation of C++17 std::filesystem for C++11 /C++14/C++17/C++20 on Windows, macOS, Linux and FreeBSD.
MIT License
1.31k stars 168 forks source link

Added a missing header for macos strcasecmp #173

Closed bugdea1er closed 9 months ago

bugdea1er commented 10 months ago

Hi there!

I am currently using v1.5.14 as a submodule in my cmake project on macOS. I have a problem with the strcasecmp function:

.../vendor/filesystem/include/ghc/filesystem.hpp:1895:15: error: no member named 'strcasecmp' in the global namespace
return 0 == ::strcasecmp(str1, str2);
            ~~^
1 error generated.

As far as I am aware, the #include <strings.h> header is required for this function, and it is not included for the macOS build.

Or am I doing something wrong?

bugdea1er commented 9 months ago

Sorry, it was me who was doing wrong. The simple test project works fine on macOS https://github.com/bugdea1er/ghc-test

gulrak commented 8 months ago

Thanks for checking it and reporting back!