Resolve possible ambiguity of 'strcmp'

This commit is contained in:
Norman Feske 2012-11-06 09:35:47 +01:00
parent 90395e9428
commit bb8d090922
1 changed files with 11 additions and 7 deletions

View File

@ -94,18 +94,22 @@ namespace Init {
{
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;
char path_buf[Parent::Session_args::MAX_SIZE];
Arg_string::find_arg(args, "root").string(path_buf, sizeof(path_buf), "");
char path[Parent::Session_args::MAX_SIZE];
Arg_string::find_arg(args, "root").string(path, sizeof(path), "");
char value_buf[Parent::Session_args::MAX_SIZE];
Genode::snprintf(value_buf, sizeof(value_buf),
char value[Parent::Session_args::MAX_SIZE];
Genode::snprintf(value, sizeof(value),
"\"%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);
}
};