Resolve possible ambiguity of 'strcmp'
This commit is contained in:
parent
90395e9428
commit
bb8d090922
|
@ -94,18 +94,22 @@ namespace Init {
|
||||||
{
|
{
|
||||||
using namespace Genode;
|
using namespace Genode;
|
||||||
|
|
||||||
if (strcmp(session, "PD") != 0)
|
/*
|
||||||
|
* Specify 'Genode' namespace to remove possible ambiguity of
|
||||||
|
* 'strcmp' when including the header along with libc headers.
|
||||||
|
*/
|
||||||
|
if (Genode::strcmp(session, "PD") != 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
char path_buf[Parent::Session_args::MAX_SIZE];
|
char path[Parent::Session_args::MAX_SIZE];
|
||||||
Arg_string::find_arg(args, "root").string(path_buf, sizeof(path_buf), "");
|
Arg_string::find_arg(args, "root").string(path, sizeof(path), "");
|
||||||
|
|
||||||
char value_buf[Parent::Session_args::MAX_SIZE];
|
char value[Parent::Session_args::MAX_SIZE];
|
||||||
Genode::snprintf(value_buf, sizeof(value_buf),
|
Genode::snprintf(value, sizeof(value),
|
||||||
"\"%s%s\"",
|
"\"%s%s\"",
|
||||||
_root_prefix, path_buf);
|
_root_prefix, path);
|
||||||
|
|
||||||
Arg_string::set_arg(args, args_len, "root", value_buf);
|
Arg_string::set_arg(args, args_len, "root", value);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user