]> git.kaiwu.me - njs.git/commitdiff
Fixed building on Solaris by SunC.
authorIgor Sysoev <igor@sysoev.ru>
Wed, 10 Feb 2016 16:18:22 +0000 (19:18 +0300)
committerIgor Sysoev <igor@sysoev.ru>
Wed, 10 Feb 2016 16:18:22 +0000 (19:18 +0300)
njs/njs_builtin.c

index 9ee2d281e8df616d884a1c61f55057e780aa3e3b..a04e9a3ffca7e8923adc2ee57d1932ed964de8b0 100644 (file)
@@ -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 = {