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

[macOS Big Sur] getpagesize is deprecated in macOS Big Sur #1906

Closed
rbranche opened this issue Jan 15, 2021 · 2 comments
Closed

[macOS Big Sur] getpagesize is deprecated in macOS Big Sur #1906

rbranche opened this issue Jan 15, 2021 · 2 comments

Comments

@rbranche
Copy link

Summary

  • OS: macOS Big Sur
  • Architecture: 64bit
  • Psutil version: psutil==5.7.3
  • Python version: Python 3.8.2
  • Type: core

Description

Even with the previous unistd.h include fix (#1791 and #1794), Big Sur has a later POSIX version where getpagesize is still not included in unistd.h:

555 /* Removed in Issue 6 */
556 #if !defined(_POSIX_C_SOURCE) || _POSIX_C_SOURCE < 200112L
557 int  getdtablesize(void) __POSIX_C_DEPRECATED(199506L);
558 int  getpagesize(void) __pure2 __POSIX_C_DEPRECATED(199506L);
559 char    *getpass(const char *) __POSIX_C_DEPRECATED(199506L);
560 #endif

building 'psutil._psutil_osx' extension
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -iwithsysroot/System/Library/Frameworks/System.framework/PrivateHeaders -iwithsysroot/AppleInternal/Library/Frameworks/Python.framework/Versions/3.8/Headers -arch arm64e -arch x86_64 -DPSUTIL_POSIX=1 -DPSUTIL_SIZEOF_PID_T=4 -DPSUTIL_VERSION=580 -DPSUTIL_OSX=1 -I/AppleInternal/Library/Frameworks/Python.framework/Versions/3.8/include/python3.8 -c psutil/_psutil_common.c -o build/temp.macosx-10.15-x86_64-3.8/psutil/_psutil_common.o
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -iwithsysroot/System/Library/Frameworks/System.framework/PrivateHeaders -iwithsysroot/AppleInternal/Library/Frameworks/Python.framework/Versions/3.8/Headers -arch arm64e -arch x86_64 -DPSUTIL_POSIX=1 -DPSUTIL_SIZEOF_PID_T=4 -DPSUTIL_VERSION=580 -DPSUTIL_OSX=1 -I/AppleInternal/Library/Frameworks/Python.framework/Versions/3.8/include/python3.8 -c psutil/_psutil_posix.c -o build/temp.macosx-10.15-x86_64-3.8/psutil/_psutil_posix.o
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -iwithsysroot/System/Library/Frameworks/System.framework/PrivateHeaders -iwithsysroot/AppleInternal/Library/Frameworks/Python.framework/Versions/3.8/Headers -arch arm64e -arch x86_64 -DPSUTIL_POSIX=1 -DPSUTIL_SIZEOF_PID_T=4 -DPSUTIL_VERSION=580 -DPSUTIL_OSX=1 -I/AppleInternal/Library/Frameworks/Python.framework/Versions/3.8/include/python3.8 -c psutil/_psutil_osx.c -o build/temp.macosx-10.15-x86_64-3.8/psutil/_psutil_osx.o
psutil/_psutil_osx.c:51:9: warning: _POSIX_C_SOURCE: 200809L

200809L

PAGE_SIZE was added in macOS 10.10 (Yosemite). In fact, PAGE_SIZE is already being used in another place in this file already, so it should be ok changing these other getpagesize calls to PAGE_SIZE.

@rbranche rbranche added the bug label Jan 15, 2021
@github-actions github-actions bot added the macos label Jan 15, 2021
@rbranche rbranche changed the title [macOS Big Sur] title [macOS Big Sur] getpagesize is deprecated in macOS Big Sur Jan 15, 2021
@giampaolo
Copy link
Owner

This was already fixed in 5.8.0.

@rbranche
Copy link
Author

Ah, sorry for the noise then.

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

Successfully merging a pull request may close this issue.

2 participants