Skip to content

Commit 00ad845

Browse files
committed
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 <[email protected]>
1 parent b5af716 commit 00ad845

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

testing/testsuites/kernel/socket/cases/net_socket_test_010.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ static char *ifindex2name(int fd, unsigned index, char *name)
7676
int ret;
7777

7878
ifr.ifr_ifindex = index;
79-
ret = ioctl(fd, siocgifname, &ifr);
79+
ret = ioctl(fd, SIOCGIFNAME, &ifr);
8080
if (ret < 0)
8181
{
8282
return NULL;
@@ -185,7 +185,7 @@ static int ioctltestinternal(int sfd)
185185
assert_int_equal(ret, lanindex);
186186

187187
ifr.ifr_ifindex = lanindex;
188-
ret = ioctl(sfd, siocgifname, &ifr);
188+
ret = ioctl(sfd, SIOCGIFNAME, &ifr);
189189
assert_int_equal(ret, 0);
190190
syslog(LOG_INFO, "name of ifindex %u: %s", lanindex, ifr.ifr_name);
191191
assert_string_equal(ifr.ifr_name, lanname);

0 commit comments

Comments
 (0)