mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-08-05 17:30:27 +00:00
Removed circular dependency with the winsock library by using the weaken
way to access a symbol from a higher-level library
This commit is contained in:
parent
1d3bb7a467
commit
0b20b4cdf8
1 changed files with 3 additions and 2 deletions
|
@ -16,6 +16,7 @@
|
||||||
│ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │
|
│ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │
|
||||||
│ PERFORMANCE OF THIS SOFTWARE. │
|
│ PERFORMANCE OF THIS SOFTWARE. │
|
||||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||||
|
#include "libc/bits/weaken.h"
|
||||||
#include "libc/calls/calls.h"
|
#include "libc/calls/calls.h"
|
||||||
#include "libc/calls/internal.h"
|
#include "libc/calls/internal.h"
|
||||||
#include "libc/sysv/consts/o.h"
|
#include "libc/sysv/consts/o.h"
|
||||||
|
@ -46,9 +47,9 @@ textwindows int ioctl_siocgifconf_nt(int fd, struct ifconf *ifc) {
|
||||||
return ebadf();
|
return ebadf();
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = WSAIoctl(g_fds.p[fd].handle, kNtSioGetInterfaceList, NULL, 0, &iflist, sizeof(iflist), &dwBytes, NULL, NULL);
|
ret = weaken(WSAIoctl)(g_fds.p[fd].handle, kNtSioGetInterfaceList, NULL, 0, &iflist, sizeof(iflist), &dwBytes, NULL, NULL);
|
||||||
if (ret == -1) {
|
if (ret == -1) {
|
||||||
return __winsockerr();
|
return weaken(__winsockerr)();
|
||||||
}
|
}
|
||||||
|
|
||||||
count = dwBytes / sizeof(struct NtInterfaceInfo);
|
count = dwBytes / sizeof(struct NtInterfaceInfo);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue