Closed kubo closed 3 years ago
Thanks @kubo
I've marked this for version 4.1 but if a patch release (4.0.2) is created I'll include it in there, too.
Let me know if the creation of a patch release would be helpful to you, @kubo.
This was included in 4.0.2 released on August 31, 2020.
ODPI-C version: 4.0.1 OS: Cygwin on Windows Compiler: gcc
Cygwin declares GNU-version strerror_r when
_GNU_SOURCE
is defined. However the POSIX version is used in the following code.No warnings by accident when compiling ODPI-C. That's because comparison with a pointer and literal zero is compilable without warnings.
When the above code is changed as follows,
gcc prints the following warning.
This implies that the strerror_r isn't the POSIX version returning
int
. It is the GNU version returningchar *
.The following code in place of
#if defined(__GLIBC__)
fixes the issue.