GNOME Bugzilla – Bug 776193
Should use uint32_t instead of u_int32_t in coverage.cpp
Last modified: 2016-12-18 05:42:47 UTC
gjs mostly uses the portable, C99 standard uint32_t type. However, one place in coverage.cpp, u_int32_t is used, which works on Linux, but causes build failures on Solaris: gjs-1.43.3/gjs/coverage.cpp: In function 'gboolean get_array_from_js_value(JSContext*, jsval*, std::size_t, GDestroyNotify, ConvertAndInsertJSVal, GArray**)': gjs-1.43.3/gjs/coverage.cpp:488:5: error: 'u_int32_t' was not declared in this scope u_int32_t js_array_len; ^ gjs-1.43.3/gjs/coverage.cpp:493:47: error: 'js_array_len' was not declared in this scope if (JS_GetArrayLength(context, js_array, &js_array_len)) { ^ gjs-1.43.3/gjs/coverage.cpp:494:19: error: expected ';' before 'i' u_int32_t i = 0; ^ gjs-1.43.3/gjs/coverage.cpp:495:16: error: 'i' was not declared in this scope for (; i < js_array_len; ++i) { ^
Created attachment 342102 [details] [review] Patch currently used in Solaris builds
Review of attachment 342102 [details] [review]: Looks good, thanks for the patch!