Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing include in jm_locale_test.c #95

Open
joakimono opened this issue Nov 8, 2023 · 2 comments
Open

Add missing include in jm_locale_test.c #95

joakimono opened this issue Nov 8, 2023 · 2 comments

Comments

@joakimono
Copy link

One some platforms (Macos), compilation of Test/jm_locale_test.c fails, since exit() is undefined.
The solution is to #include <stdlib.h>, as is done in e.g. Test/fmi_zip_zip_test.c

@modelonrobinandersson
Copy link
Collaborator

Hi @joakimono, what is the error you see on MacOS?

@joakimono
Copy link
Author

On MacOS the following error occurs:
../build/src/Test/jm_locale_test.c:30:5: error: implicitly declaring library function 'exit' with type 'void (int) __attribute__((noreturn))' [-Werror,-Wimplicit-function-declaration] exit(CTEST_RETURN_FAIL); ../build/src/Test/jm_locale_test.c:30:5: note: include the header <stdlib.h> or explicitly provide a declaration for 'exit' 1 error generated.

Below are the build settings, which were used:
MacOSX11.3.sdk
os=Macos
arch=x86_64
compiler=apple-clang
compiler.version=13
compiler.libcxx=libc++
build_type=Release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants