-
-
Notifications
You must be signed in to change notification settings - Fork 30.4k
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
bpo-34555: Fix incorrectly nested test for HAVE_LINUX_VM_SOCKETS_H #9016
Conversation
Hello, and thanks for your contribution! I'm a bot set up to make sure that the project can legally accept your contribution by verifying you have signed the PSF contributor agreement (CLA). Unfortunately our records indicate you have not signed the CLA. For legal reasons we need you to sign this before we can look at your contribution. Please follow the steps outlined in the CPython devguide to rectify this issue. You can check yourself to see if the CLA has been received. Thanks again for your contribution, we look forward to reviewing it! |
#ifdef HAVE_LINUX_VM_SOCKETS_H | ||
# include <linux/vm_sockets.h> | ||
#else | ||
# undef AF_VSOCK | ||
#endif | ||
|
||
#ifdef HAVE_SOCKADDR_ALG |
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.
It would help to have a space after this line to make it symmetric with the line before the #endif
.
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.
This makes sense, amended my pull request.
# endif | ||
# ifndef SOL_ALG | ||
# define SOL_ALG 279 | ||
# endif |
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.
These ifdef
s seem rather silly to me. If linux/if_alg.h
exists, surely sys/socket.h
is going to define AF_ALG
and SOL_ALG
, right?
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 don't know enough about this topic to be sure, but from a cursory search it appears to be a guideline in the Linux docs to include this block, in case of older header files that don't yet define these constants themselves.
Thanks @mcduke for the PR, and @benjaminp for merging it 🌮🎉.. I'm working now to backport this PR to: 3.7. |
…TS_H (pythonGH-9016) (cherry picked from commit 2d7102e) Co-authored-by: Thomas Herzog <thomas@mcduke.net>
GH-9029 is a backport of this pull request to the 3.7 branch. |
Unnested the check for
HAVE_LINUX_VM_SOCKETS_H
, to be independent ofHAVE_SOCKADDR_ALG
. Also added indentation to theHAVE_SOCKADDR_ALG
block to make it clearer where it starts and ends.https://bugs.python.org/issue34555