mirror of
https://github.com/espressif/openthread.git
synced 2026-08-21 18:09:52 +00:00
[posix] fix two compile-time errors for macOS utun driver (#4921)
This commit is contained in:
@@ -1210,12 +1210,12 @@ static void platformConfigureTunDevice(otInstance *aInstance,
|
||||
|
||||
(void)aInstance;
|
||||
|
||||
sTunFd = NonBlockSocketWithCloseExec(PF_SYSTEM, SOCK_DGRAM, SYSPROTO_CONTROL);
|
||||
sTunFd = SocketWithCloseExec(PF_SYSTEM, SOCK_DGRAM, SYSPROTO_CONTROL, kSocketNonBlock);
|
||||
VerifyOrDie(sTunFd >= 0, OT_EXIT_ERROR_ERRNO);
|
||||
|
||||
memset(&info, 0, sizeof(info));
|
||||
strncpy(info.ctl_name, UTUN_CONTROL_NAME, strlen(UTUN_CONTROL_NAME));
|
||||
err = ioctl(fd, CTLIOCGINFO, &info);
|
||||
err = ioctl(sTunFd, CTLIOCGINFO, &info);
|
||||
VerifyOrDie(err == 0, OT_EXIT_ERROR_ERRNO);
|
||||
|
||||
addr.sc_id = info.ctl_id;
|
||||
|
||||
Reference in New Issue
Block a user