Sign in
pigweed
/
third_party
/
github
/
zephyrproject-rtos
/
zephyr
/
48ee3ee837aaf43d3f89158fab4bd4a9fdad583f
/
.
/
subsys
/
net
/
lib
/
sockets
/
sockets_misc.c
blob: c950c71e688210fe943a199f25165fb7bf1d0d57 [
file
] [
log
] [
blame
]
/*
* Copyright (c) 2019 Linaro Limited
*
* SPDX-License-Identifier: Apache-2.0
*/
#include
<errno.h>
#include
<net/socket.h>
int
zsock_gethostname
(
char
*
buf
,
size_t
len
)
{
const
char
*
p
=
net_hostname_get
();
strncpy
(
buf
,
p
,
len
);
return
0
;
}