diff options
author | Thomas Herzog <thomas@mcduke.net> | 2018-09-01 22:13:57 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2018-09-01 22:13:57 (GMT) |
commit | 2d7102e726e973ab2d307aa9748c7ec433677877 (patch) | |
tree | 6b8d20b623d143365e6f8d9eab4ba2b7cdee0e12 /Modules | |
parent | 5265b3a98b376684e361b62d0728483b26f493f2 (diff) | |
download | cpython-2d7102e726e973ab2d307aa9748c7ec433677877.zip cpython-2d7102e726e973ab2d307aa9748c7ec433677877.tar.gz cpython-2d7102e726e973ab2d307aa9748c7ec433677877.tar.bz2 |
closes bpo-34555: Fix incorrectly nested test for HAVE_LINUX_VM_SOCKETS_H (GH-9016)
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/socketmodule.h | 49 |
1 files changed, 25 insertions, 24 deletions
diff --git a/Modules/socketmodule.h b/Modules/socketmodule.h index bce74c3..0b2edc1 100644 --- a/Modules/socketmodule.h +++ b/Modules/socketmodule.h @@ -101,39 +101,40 @@ typedef int socklen_t; #include <sys/kern_control.h> #endif -#ifdef HAVE_SOCKADDR_ALG -#include <linux/if_alg.h> -#ifndef AF_ALG -#define AF_ALG 38 -#endif -#ifndef SOL_ALG -#define SOL_ALG 279 -#endif - #ifdef HAVE_LINUX_VM_SOCKETS_H # include <linux/vm_sockets.h> #else # undef AF_VSOCK #endif +#ifdef HAVE_SOCKADDR_ALG + +# include <linux/if_alg.h> +# ifndef AF_ALG +# define AF_ALG 38 +# endif +# ifndef SOL_ALG +# define SOL_ALG 279 +# endif + /* Linux 3.19 */ -#ifndef ALG_SET_AEAD_ASSOCLEN -#define ALG_SET_AEAD_ASSOCLEN 4 -#endif -#ifndef ALG_SET_AEAD_AUTHSIZE -#define ALG_SET_AEAD_AUTHSIZE 5 -#endif +# ifndef ALG_SET_AEAD_ASSOCLEN +# define ALG_SET_AEAD_ASSOCLEN 4 +# endif +# ifndef ALG_SET_AEAD_AUTHSIZE +# define ALG_SET_AEAD_AUTHSIZE 5 +# endif /* Linux 4.8 */ -#ifndef ALG_SET_PUBKEY -#define ALG_SET_PUBKEY 6 -#endif +# ifndef ALG_SET_PUBKEY +# define ALG_SET_PUBKEY 6 +# endif -#ifndef ALG_OP_SIGN -#define ALG_OP_SIGN 2 -#endif -#ifndef ALG_OP_VERIFY -#define ALG_OP_VERIFY 3 -#endif +# ifndef ALG_OP_SIGN +# define ALG_OP_SIGN 2 +# endif +# ifndef ALG_OP_VERIFY +# define ALG_OP_VERIFY 3 +# endif #endif /* HAVE_SOCKADDR_ALG */ |