Skip to content

Commit 979b19b

Browse files
ngotohsbt
authored andcommitted
[ruby/json] Add support for Solaris 10 which lacks strnlen()
Check for existence of strnlen() and use alternative code if it is missing. ruby/json@48d4bbc3a0
1 parent bba66f9 commit 979b19b

File tree

3 files changed

+133
-116
lines changed

3 files changed

+133
-116
lines changed

ext/json/parser/extconf.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
have_func("rb_hash_new_capa", "ruby.h") # RUBY_VERSION >= 3.2
66
have_func("rb_hash_bulk_insert", "ruby.h") # Missing on TruffleRuby
77
have_func("rb_category_warn", "ruby.h") # Missing on TruffleRuby
8+
have_func("strnlen", "string.h") # Missing on Solaris 10
89

910
append_cflags("-std=c99")
1011

0 commit comments

Comments
 (0)