-
Notifications
You must be signed in to change notification settings - Fork 168
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
Cannot compile library due to _BSD_SOURCE wrong usage #4301
Comments
defined(_BSD_SOURCE) resulted in error related "realpath" not existing |
Thanks for reporting. Your PR would be appreciated. |
@beutlich I can open a PR but i'm not confident enough in C and Modelica to be able to say that this fix is legitim |
@TeoGoddet I created #4302. If you have a chance to test you can give a review comment there. |
#4302 is now merged. @Esther-Devakirubai please back-port this to maint/v4.1.x |
Done by #4530. |
All set after #4530. |
Hello,
I'm not a C expert, but I'm having problem compiling when I include open62541 lib (the amalgamated single file)
The error I have is
line 609 looks like that in my dymola install :
#if defined(_WIN32) || (_BSD_SOURCE || _XOPEN_SOURCE >= 500 || _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED || (_POSIX_VERSION >= 200112L))
The concerned line in the actual lib seems this one :
ModelicaStandardLibrary/Modelica/Resources/C-Sources/ModelicaInternal.c
Line 687 in bc5c458
I think this occur because the _BSD_SOURCE define is empty because of this line in my lib :
https://github.com/open62541/open62541/blob/6115a47125d7e6ccd77488b8572807171adb0602/tools/ua-tool/ua.c#L18
open62541 seems legit to define _BSD_SOURCE empty
see https://ftp.gnu.org/old-gnu/Manuals/glibc-2.2.3/html_node/libc_13.html
I would suggest replacing _BSD_SOURCE by defined(_BSD_SOURCE) in ModelicaInternal.c
I can open a MR is it seem the right fix
Note that there is three occurence of _BSD_SOURCE to fix
The text was updated successfully, but these errors were encountered: