summaryrefslogtreecommitdiff
path: root/ext/openssl/ossl_bio.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/openssl/ossl_bio.c')
-rw-r--r--ext/openssl/ossl_bio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/openssl/ossl_bio.c b/ext/openssl/ossl_bio.c
index 1358478acbc..6db1fb9a628 100644
--- a/ext/openssl/ossl_bio.c
+++ b/ext/openssl/ossl_bio.c
@@ -25,7 +25,7 @@ ossl_obj2bio(VALUE obj)
GetOpenFile(obj, fptr);
rb_io_check_readable(fptr);
- if ((fd = dup(fptr->fd)) < 0){
+ if ((fd = dup(FPTR_TO_FD(fptr))) < 0){
rb_sys_fail(0);
}
if (!(fp = fdopen(fd, "r"))){