Skip to content

Commit d21ecb6

Browse files
committed
Prevent requirement of C99 mode
After aplying this patch nginx can't be build because: ``` src/event/ngx_event_openssl.c: In function 'ngx_SSL_client_features': src/event/ngx_event_openssl.c:1628:17: error: 'for' loop initial declarations are only allowed in C99 mode src/event/ngx_event_openssl.c:1628:17: note: use option -std=c99 or -std=gnu99 to compile your code ``` This simple changes fixed it
1 parent 6f0a0d1 commit d21ecb6

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

patches/nginx.1.17.1.ssl.extensions.patch

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
diff -r d964b0aee8e7 src/event/ngx_event_openssl.c
22
--- a/src/event/ngx_event_openssl.c Thu May 23 16:49:22 2019 +0300
33
+++ b/src/event/ngx_event_openssl.c Sat Jun 01 14:53:52 2019 +0000
4-
@@ -1588,6 +1588,107 @@
4+
@@ -1588,6 +1588,108 @@
55
return NGX_OK;
66
}
77

@@ -14,6 +14,7 @@ diff -r d964b0aee8e7 src/event/ngx_event_openssl.c
1414
+ unsigned short *ciphers_out = NULL;
1515
+ int *curves_out = NULL;
1616
+ int *point_formats_out = NULL;
17+
+ size_t i;
1718
+ size_t len = 0;
1819
+ SSL *s = NULL;
1920
+
@@ -42,7 +43,7 @@ diff -r d964b0aee8e7 src/event/ngx_event_openssl.c
4243
+ len = c->ssl->curves_sz * sizeof(unsigned short);
4344
+ c->ssl->curves = ngx_pnalloc(c->pool, len);
4445
+ if (c->ssl->curves != NULL) {
45-
+ for (size_t i = 0; i < c->ssl->curves_sz; i++) {
46+
+ for (i = 0; i < c->ssl->curves_sz; i++) {
4647
+ c->ssl->curves[i] = curves_out[i];
4748
+ }
4849
+ }

0 commit comments

Comments
 (0)