-
Notifications
You must be signed in to change notification settings - Fork 446
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
CDRIVER-4790 AIX has a glibc-compatible strerror_r w/ diff name #1481
Conversation
The AIX strerror_r doesn't have the same semantics as glibc's (diff type signature), but it does provide one under a different name. This name is used if you use -D_LINUX_SOURCE_COMPAT, but it's a big hammer. We can just use it directly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the contribution!
Since AIX is not officially, supported, I wanted to give some disclaimer information: We do not officially support AIX, and we also do not test on AIX, so we cannot guarantee that the driver will behave correctly on AIX. We also cannot guarantee that the AIX build will not be broken in the future. However, we are open to accepting small fixes like this if the build ever does break in the future.
Once again, thanks for the contribution!
#elif defined(_AIX) | ||
// AIX does not provide strerror_l, and its strerror_r isn't glibc's. | ||
// But it does provide a glibc compatible one called __linux_strerror_r | ||
ret = __linux_strerror_r (err_code, buf, buflen); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@NattyNarwhal: did you guys only come across this after upgrading to libmongoc 1.24? It looks like it may be related to the recent changes in CDRIVER-4679, which were prompted by PHPC-2263.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I finally had the opportunity to upgrade from whatever the vendored version in 1.12 of the PHP driver was to whatever the version in 1.16 was, so I'd be running in context of that release of the PHP driver's configure script.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. If you jumped from 1.12 to 1.16 I think it's safe to assume this issue was introduced by the aforementioned fixes for Alpine Linux. ✌️
I created PHPC-2332 to track this and ensure we make a 1.17.x patch release following libmongoc 1.25.2.
The AIX strerror_r doesn't have the same semantics as glibc's (diff type signature), but it does provide one under a different name. This name is used if you use -D_LINUX_SOURCE_COMPAT, but it's a big hammer. We can just use it directly.