Project

General

Profile

Actions

Bug #12769

closed

Since r56098, compile error in ossl_ssl.c line 639, with old version of fcc on Solaris 10

Added by ngoto (Naohisa Goto) over 7 years ago. Updated over 7 years ago.

Status:
Closed
Assignee:
-
Target version:
-
[ruby-dev:49809]

Description

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);
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0