We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Misc/NEWS
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
GitHub fields:
assignee = None closed_at = <Date 2016-11-12.21:43:39.843> created_at = <Date 2016-11-12.19:30:20.896> labels = ['OS-mac', 'build', '3.7'] title = "On macOS Sierra, warning: implicit declaration of function 'getentropy'" updated_at = <Date 2017-03-31.16:36:38.720> user = 'https://github.com/gareth-rees'
bugs.python.org fields:
activity = <Date 2017-03-31.16:36:38.720> actor = 'dstufft' assignee = 'none' closed = True closed_date = <Date 2016-11-12.21:43:39.843> closer = 'ned.deily' components = ['Build', 'macOS'] creation = <Date 2016-11-12.19:30:20.896> creator = 'gdr@garethrees.org' dependencies = [] files = ['45465'] hgrepos = [] issue_num = 28676 keywords = ['patch'] message_count = 3.0 messages = ['280669', '280672', '280674'] nosy_count = 4.0 nosy_names = ['ronaldoussoren', 'ned.deily', 'python-dev', 'gdr@garethrees.org'] pr_nums = ['552'] priority = 'normal' resolution = 'fixed' stage = 'resolved' status = 'closed' superseder = None type = 'compile error' url = 'https://bugs.python.org/issue28676' versions = ['Python 2.7', 'Python 3.5', 'Python 3.6', 'Python 3.7']
The text was updated successfully, but these errors were encountered:
On macOS Sierra (OSX 10.12.1):
$ ./configure --with-pydebug && make [... lots of output omitted ...] gcc -c -Wno-unused-result -Wsign-compare -g -O0 -Wall -Wstrict-prototypes -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -I. -I./Include -DPy_BUILD_CORE -o Python/random.o Python/random.c Python/random.c:97:19: warning: implicit declaration of function 'getentropy' is invalid in C99 [-Wimplicit-function-declaration] res = getentropy(buffer, len); ^ 1 warning generated.
This is because OSX 10.12.1 has getentropy() but does not have getrandom(). You can see this in pyconfig.h:
/* Define to 1 if you have the `getentropy' function. */ #define HAVE_GETENTROPY 1
/* Define to 1 if the getrandom() function is available */ /* #undef HAVE_GETRANDOM */
and this means that in Python/random.c the header <sys/random.h> is not included:
# ifdef HAVE_GETRANDOM # include <sys/random.h> # elif defined(HAVE_GETRANDOM_SYSCALL) # include <sys/syscall.h> # endif
It's necessary include <sys/random.h> if either HAVE_GETRANDOM or HAVE_GETENTROPY is defined.
Sorry, something went wrong.
New changeset 828251c2bccf by Ned Deily in branch '2.7': Issue bpo-28676: Prevent missing 'getentropy' declaration warning on macOS. https://hg.python.org/cpython/rev/828251c2bccf
New changeset 0efd48d4c47c by Ned Deily in branch '3.5': Issue bpo-28676: Prevent missing 'getentropy' declaration warning on macOS. https://hg.python.org/cpython/rev/0efd48d4c47c
New changeset e2faa8a22b69 by Ned Deily in branch '3.6': Issue bpo-28676: merge from 3.5 https://hg.python.org/cpython/rev/e2faa8a22b69
New changeset b31a7efd8b31 by Ned Deily in branch 'default': Issue bpo-28676: merge from 3.6 https://hg.python.org/cpython/rev/b31a7efd8b31
Thanks for the patch, Gareth! Pushed for release in 2.7.13, 3.5.3, 3.6.0b4, and 3.7.0.
No branches or pull requests
Misc/NEWS
so that it is managed by towncrier #552Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: