-
-
Notifications
You must be signed in to change notification settings - Fork 430
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
Use of _POSIX_C_SOURCE=200809L breaks build on OpenBSD #711
Labels
platform specific
Issue only affects a specific platform
Comments
Can you submit a PR? I don't have an OpenBSD setup. |
The PR is against master or develop? |
develop. Thx! |
brad0
added a commit
to brad0/minizip-ng
that referenced
this issue
Jun 11, 2023
Setting _POSIX_C_SOURCE on OpenBSD breaks the build. _BSD_SOURCE needs to be set at the same time to enable some functions. In file included from /home/brad/tmp/ffmpeg-ports/ports/pobj/minizip-4.0.0/minizip-ng-4.0.0/test/test_main.cc:5: In file included from /usr/local/include/gtest/gtest.h:55: In file included from /usr/include/c++/v1/ostream:140: In file included from /usr/include/c++/v1/locale:218: /usr/include/c++/v1/__bsd_locale_fallbacks.h:122:17: error: use of undeclared identifier 'vasprintf'; did you mean 'vsprintf'? int __res = vasprintf(__s, __format, __va); ^ /usr/include/c++/v1/cstdio:124:9: note: 'vsprintf' declared here using ::vsprintf _LIBCPP_USING_IF_EXISTS; ^ In file included from /home/brad/tmp/ffmpeg-ports/ports/pobj/minizip-4.0.0/minizip-ng-4.0.0/test/test_main.cc:5: In file included from /usr/local/include/gtest/gtest.h:55: In file included from /usr/include/c++/v1/ostream:140: In file included from /usr/include/c++/v1/locale:218: /usr/include/c++/v1/__bsd_locale_fallbacks.h:122:27: error: cannot initialize a parameter of type 'char *' with an lvalue of type 'char **' int __res = vasprintf(__s, __format, __va); ^~~ /usr/include/stdio.h:269:21: note: passing argument to parameter here int vsprintf(char *, const char *, __va_list); ^ 2 errors generated.
nmoinvaz
pushed a commit
that referenced
this issue
Jun 11, 2023
Setting _POSIX_C_SOURCE on OpenBSD breaks the build. _BSD_SOURCE needs to be set at the same time to enable some functions. In file included from /home/brad/tmp/ffmpeg-ports/ports/pobj/minizip-4.0.0/minizip-ng-4.0.0/test/test_main.cc:5: In file included from /usr/local/include/gtest/gtest.h:55: In file included from /usr/include/c++/v1/ostream:140: In file included from /usr/include/c++/v1/locale:218: /usr/include/c++/v1/__bsd_locale_fallbacks.h:122:17: error: use of undeclared identifier 'vasprintf'; did you mean 'vsprintf'? int __res = vasprintf(__s, __format, __va); ^ /usr/include/c++/v1/cstdio:124:9: note: 'vsprintf' declared here using ::vsprintf _LIBCPP_USING_IF_EXISTS; ^ In file included from /home/brad/tmp/ffmpeg-ports/ports/pobj/minizip-4.0.0/minizip-ng-4.0.0/test/test_main.cc:5: In file included from /usr/local/include/gtest/gtest.h:55: In file included from /usr/include/c++/v1/ostream:140: In file included from /usr/include/c++/v1/locale:218: /usr/include/c++/v1/__bsd_locale_fallbacks.h:122:27: error: cannot initialize a parameter of type 'char *' with an lvalue of type 'char **' int __res = vasprintf(__s, __format, __va); ^~~ /usr/include/stdio.h:269:21: note: passing argument to parameter here int vsprintf(char *, const char *, __va_list); ^ 2 errors generated.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The use of
_POSIX_C_SOURCE=200809L
breaks the build on OpenBSD. _BSD_SOURCE needs to be defined to have the headers do the right thing with_POSIX_C_SOURCE=200809L
in use.The text was updated successfully, but these errors were encountered: