diff --git a/src/node.cc b/src/node.cc index 3f49ec4edb7..c88b0effbac 100644 --- a/src/node.cc +++ b/src/node.cc @@ -1549,12 +1549,14 @@ static gid_t gid_by_name(Handle value) { static void GetUid(const FunctionCallbackInfo& args) { - args.GetReturnValue().Set(getuid()); + // uid_t is an uint32_t on all supported platforms. + args.GetReturnValue().Set(static_cast(getuid())); } static void GetGid(const FunctionCallbackInfo& args) { - args.GetReturnValue().Set(getgid()); + // gid_t is an uint32_t on all supported platforms. + args.GetReturnValue().Set(static_cast(getgid())); }