File tree Expand file tree Collapse file tree 2 files changed +27
-24
lines changed Expand file tree Collapse file tree 2 files changed +27
-24
lines changed Original file line number Diff line number Diff line change
1
+ Fix for case where it was not possible to have both
2
+ ``HAVE_LINUX_VM_SOCKETS_H `` and ``HAVE_SOCKADDR_ALG `` be undefined.
Original file line number Diff line number Diff line change @@ -101,39 +101,40 @@ typedef int socklen_t;
101
101
#include <sys/kern_control.h>
102
102
#endif
103
103
104
- #ifdef HAVE_SOCKADDR_ALG
105
- #include <linux/if_alg.h>
106
- #ifndef AF_ALG
107
- #define AF_ALG 38
108
- #endif
109
- #ifndef SOL_ALG
110
- #define SOL_ALG 279
111
- #endif
112
-
113
104
#ifdef HAVE_LINUX_VM_SOCKETS_H
114
105
# include <linux/vm_sockets.h>
115
106
#else
116
107
# undef AF_VSOCK
117
108
#endif
118
109
110
+ #ifdef HAVE_SOCKADDR_ALG
111
+
112
+ # include <linux/if_alg.h>
113
+ # ifndef AF_ALG
114
+ # define AF_ALG 38
115
+ # endif
116
+ # ifndef SOL_ALG
117
+ # define SOL_ALG 279
118
+ # endif
119
+
119
120
/* Linux 3.19 */
120
- #ifndef ALG_SET_AEAD_ASSOCLEN
121
- #define ALG_SET_AEAD_ASSOCLEN 4
122
- #endif
123
- #ifndef ALG_SET_AEAD_AUTHSIZE
124
- #define ALG_SET_AEAD_AUTHSIZE 5
125
- #endif
121
+ # ifndef ALG_SET_AEAD_ASSOCLEN
122
+ # define ALG_SET_AEAD_ASSOCLEN 4
123
+ # endif
124
+ # ifndef ALG_SET_AEAD_AUTHSIZE
125
+ # define ALG_SET_AEAD_AUTHSIZE 5
126
+ # endif
126
127
/* Linux 4.8 */
127
- #ifndef ALG_SET_PUBKEY
128
- #define ALG_SET_PUBKEY 6
129
- #endif
128
+ # ifndef ALG_SET_PUBKEY
129
+ # define ALG_SET_PUBKEY 6
130
+ # endif
130
131
131
- #ifndef ALG_OP_SIGN
132
- #define ALG_OP_SIGN 2
133
- #endif
134
- #ifndef ALG_OP_VERIFY
135
- #define ALG_OP_VERIFY 3
136
- #endif
132
+ # ifndef ALG_OP_SIGN
133
+ # define ALG_OP_SIGN 2
134
+ # endif
135
+ # ifndef ALG_OP_VERIFY
136
+ # define ALG_OP_VERIFY 3
137
+ # endif
137
138
138
139
#endif /* HAVE_SOCKADDR_ALG */
139
140
You can’t perform that action at this time.
0 commit comments