net: Using const char * in net_hostname_set()

When calling net_hostname_set() from C++, you will hit compile
errors if you attempt to use a const char *. Since the internals
of net_hostname_set() just uses memcpy(), we should pass in the
new hostname as a const char * to better support C++.

Tested using samples/cpp/hello_world, with an added call to
net_hostname_set().

Signed-off-by: Andrew Kontra <andrew@legatoxp.com>
2 files changed