Skip to content
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

Merged
merged 1 commit into from
Nov 28, 2023

Conversation

NattyNarwhal
Copy link
Contributor

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.

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.
Copy link
Contributor

@kkloberdanz kkloberdanz left a 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!

@kevinAlbs kevinAlbs changed the title AIX has a glibc-compatible strerror_r w/ diff name CDRIVER-4790 AIX has a glibc-compatible strerror_r w/ diff name Nov 28, 2023
#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);
Copy link
Member

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.

Copy link
Contributor Author

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.

Copy link
Member

@jmikola jmikola Nov 28, 2023

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.

@kkloberdanz kkloberdanz merged commit 74b027e into mongodb:master Nov 28, 2023
31 checks passed
@kkloberdanz
Copy link
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants