Skip to content

CDRIVER-4505 Fix build on MacOS due to undeclared getpagesize #1136

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

Merged
merged 3 commits into from
Oct 26, 2022

Conversation

kkloberdanz
Copy link
Contributor

@kkloberdanz kkloberdanz commented Oct 25, 2022

CDRIVER-4505

It appears that getpagesize has been deprecated on newer MacOS versions. We can see that POSIX version 7 (link below) has removed getpagesize altogether from the standard, so even including unistd.h does not solve this problem on newer MacOS versions.

Please see here at section B.3.2 System Interfaces Removed in the Previous Version:
https://pubs.opengroup.org/onlinepubs/9699919799/xrat/V4_xsh_chap03.html

Relevant stackoverflow:
https://stackoverflow.com/a/37193970

Jira:
https://jira.mongodb.org/browse/CDRIVER-4505

It appears that getpagesize has been deprecated on newer MacOS versions.
We can see that POSIX version 7 (link below) has removed getpagesize
altogether from the standard, so even including unistd.h does not solve
this problem on newer MacOS versions.

Please see here at section B.3.2 System Interfaces Removed
in the Previous Version:
https://pubs.opengroup.org/onlinepubs/9699919799/xrat/V4_xsh_chap03.html

Relevant stackoverflow:
https://stackoverflow.com/a/37193970
@kkloberdanz kkloberdanz marked this pull request as draft October 25, 2022 13:34
@kkloberdanz kkloberdanz marked this pull request as ready for review October 26, 2022 14:46
@kevinAlbs kevinAlbs requested review from galon1 and kevinAlbs October 26, 2022 14:54
@kevinAlbs kevinAlbs changed the title Fix build on MacOS due to undeclared getpagesize CDRIVER-4505 Fix build on MacOS due to undeclared getpagesize Oct 26, 2022
Copy link
Collaborator

@kevinAlbs kevinAlbs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, LGTM! When merging, include "CDRIVER-4505" in the commit message. That will result in a comment being added to the Jira ticket.

Copy link
Contributor

@galon1 galon1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@kkloberdanz kkloberdanz merged commit a73297b into mongodb:master Oct 26, 2022
@kkloberdanz kkloberdanz deleted the CDRIVER-4505 branch October 26, 2022 15:51
kevinAlbs pushed a commit that referenced this pull request Jan 3, 2023
Fix build on MacOS due to undeclared getpagesize

CDRIVER-4505

It appears that getpagesize has been deprecated on newer MacOS versions.
We can see that POSIX version 7 (link below) has removed getpagesize
altogether from the standard, so even including unistd.h does not solve
this problem on newer MacOS versions.

Please see here at section
B.3.2 System Interfaces Removed in the Previous Version:
https://pubs.opengroup.org/onlinepubs/9699919799/xrat/V4_xsh_chap03.html

Relevant stackoverflow:
https://stackoverflow.com/a/37193970

Jira:
https://jira.mongodb.org/browse/CDRIVER-4505
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants