From: Igor Sysoev Date: Wed, 10 Feb 2016 16:18:22 +0000 (+0300) Subject: Fixed building on Solaris by SunC. X-Git-Tag: 0.1.0~70 X-Git-Url: http://www.kaiwu.me/postgresql/commit/?a=commitdiff_plain;h=dbe9390921f6c81c3e5fd22a7bfa40dd31117e0e;p=njs.git Fixed building on Solaris by SunC. --- 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 = {