mirror of
https://github.com/apache/nuttx-apps.git
synced 2026-08-01 20:29:00 +00:00
testing/testsuites/kernel/socket/cases: fix compilation error
fix compilation error: kernel/socket/cases/net_socket_test_010.c: In function ‘ioctltestinternal’: kernel/socket/cases/net_socket_test_010.c:188:20: error: ‘siocgifname’ undeclared (first use in this function) 188 | ret = ioctl(sfd, siocgifname, &ifr); Signed-off-by: raiden00pl <raiden00@railab.me>
This commit is contained in:
parent
0a906edd81
commit
4f5fe44af1
1 changed files with 2 additions and 2 deletions
|
|
@ -76,7 +76,7 @@ static char *ifindex2name(int fd, unsigned index, char *name)
|
|||
int ret;
|
||||
|
||||
ifr.ifr_ifindex = index;
|
||||
ret = ioctl(fd, siocgifname, &ifr);
|
||||
ret = ioctl(fd, SIOCGIFNAME, &ifr);
|
||||
if (ret < 0)
|
||||
{
|
||||
return NULL;
|
||||
|
|
@ -185,7 +185,7 @@ static int ioctltestinternal(int sfd)
|
|||
assert_int_equal(ret, lanindex);
|
||||
|
||||
ifr.ifr_ifindex = lanindex;
|
||||
ret = ioctl(sfd, siocgifname, &ifr);
|
||||
ret = ioctl(sfd, SIOCGIFNAME, &ifr);
|
||||
assert_int_equal(ret, 0);
|
||||
syslog(LOG_INFO, "name of ifindex %u: %s", lanindex, ifr.ifr_name);
|
||||
assert_string_equal(ifr.ifr_name, lanname);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue