This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git

commit 4f5fe44af1ee634085254579102341dc9f8d01cf
Author: raiden00pl <[email protected]>
AuthorDate: Sun Nov 2 12:07:48 2025 +0100

    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]>
---
 testing/testsuites/kernel/socket/cases/net_socket_test_010.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/testing/testsuites/kernel/socket/cases/net_socket_test_010.c 
b/testing/testsuites/kernel/socket/cases/net_socket_test_010.c
index 1f049c4e8..462b07a2e 100644
--- a/testing/testsuites/kernel/socket/cases/net_socket_test_010.c
+++ b/testing/testsuites/kernel/socket/cases/net_socket_test_010.c
@@ -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);

Reply via email to