From dbe9390921f6c81c3e5fd22a7bfa40dd31117e0e Mon Sep 17 00:00:00 2001 From: Igor Sysoev Date: Wed, 10 Feb 2016 19:18:22 +0300 Subject: [PATCH] Fixed building on Solaris by SunC. --- njs/njs_builtin.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/njs/njs_builtin.c b/njs/njs_builtin.c index 9ee2d281..a04e9a3f 100644 --- a/njs/njs_builtin.c +++ b/njs/njs_builtin.c @@ -59,15 +59,16 @@ njs_builtin_objects_create(njs_vm_t *vm) }; static const njs_function_init_t native_functions[] = { - { njs_object_constructor, {} }, - { njs_array_constructor, {} }, - { njs_boolean_constructor, {} }, + /* SunC does not allow empty array initialization. */ + { njs_object_constructor, { 0 } }, + { njs_array_constructor, { 0 } }, + { njs_boolean_constructor, { 0 } }, { njs_number_constructor, { NJS_SKIP_ARG, NJS_NUMBER_ARG } }, { njs_string_constructor, { NJS_SKIP_ARG, NJS_STRING_ARG } }, - { njs_function_constructor, {} }, + { njs_function_constructor, { 0 } }, { njs_regexp_constructor, { NJS_SKIP_ARG, NJS_STRING_ARG, NJS_STRING_ARG } }, - { njs_eval_function, {} }, + { njs_eval_function, { 0 } }, }; static const njs_object_prop_t null_proto_property = { -- 2.47.3