Open TeoGoddet opened 5 months ago
defined(_BSD_SOURCE) resulted in error related "realpath" not existing I replaced _BSD_SOURCE by 0 and it compiled
I can open a MR is it seem the right fix
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 I see you made this commit in 2020, are you able to confirm my intuition ?
@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 I see you made this commit in 2020, are you able to confirm my intuition ?
@TeoGoddet I created #4302. If you have a chance to test you can give a review comment there.
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 : https://github.com/modelica/ModelicaStandardLibrary/blob/bc5c458731def2ad5b128feb1b7e9a563b031a6a/Modelica/Resources/C-Sources/ModelicaInternal.c#L687I 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