[ruby-dev:49809] [Ruby trunk Bug#12769] Since r56098, compile error in ossl_ssl.c line 639, with old version of fcc on Solaris 10
From:
ngotogenome@...
Date:
2016-09-16 12:49:08 UTC
List:
ruby-dev #49809
Issue #12769 has been reported by Naohisa Goto.
----------------------------------------
Bug #12769: Since r56098, compile error in ossl_ssl.c line 639, with old version of fcc on Solaris 10
https://bugs.ruby-lang.org/issues/12769
* Author: Naohisa Goto
* Status: Open
* Priority: Normal
* Assignee:
* ruby -v:
* Backport: 2.1: UNKNOWN, 2.2: UNKNOWN, 2.3: UNKNOWN
----------------------------------------
Since r56098, build of ext/openssl/ossl_ssl.c failed with the following compile error, with old version of fcc (Fujitsu C Compiler) on Solaris 10.
```
compiling ossl_ssl.c
(snip warnings)
"ossl_ssl.c", line 639: error: initialization: constant expression is expected for variable: `args'
(snip warnings)
make[2]: *** [ossl_ssl.o] Error 1
make[2]: Leaving directory `/XXXXX/trunk-56170/ext/openssl'
make[1]: *** [ext/openssl/all] Error 2
make[1]: Leaving directory `/XXXXX/trunk-56170'
make: *** [build-ext] Error 2
```
The following patch solved the problem.
```
Index: ext/openssl/ossl_ssl.c
===================================================================
--- ext/openssl/ossl_ssl.c (revision 56172)
+++ ext/openssl/ossl_ssl.c (working copy)
@@ -636,8 +636,12 @@
{
VALUE selected;
int status;
- struct npn_select_cb_common_args args = { cb, in, inlen };
+ struct npn_select_cb_common_args args;
+ args.cb = cb;
+ args.in = in;
+ args.inlen = inlen;
+
selected = rb_protect(npn_select_cb_common_i, (VALUE)&args, &status);
if (status) {
VALUE ssl_obj = (VALUE)SSL_get_ex_data(ssl, ossl_ssl_ex_ptr_idx);
```
--
https://bugs.ruby-lang.org/