mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 18:07:35 +00:00
LibC: Add definitions/stubs for IPv6 functionality
This lets us build some of the ports without patching out any of their IPv6 stuff.
This commit is contained in:
parent
1bd6705636
commit
e4339be13b
4 changed files with 67 additions and 0 deletions
23
Userland/Libraries/LibC/net.cpp
Normal file
23
Userland/Libraries/LibC/net.cpp
Normal file
|
@ -0,0 +1,23 @@
|
|||
/*
|
||||
* Copyright (c) 2021, Gunnar Beutner <gbeutner@serenityos.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <LibC/errno.h>
|
||||
#include <LibC/net/if.h>
|
||||
#include <LibC/netinet/in.h>
|
||||
|
||||
in6_addr in6addr_any = IN6ADDR_ANY_INIT;
|
||||
|
||||
unsigned int if_nametoindex([[maybe_unused]] const char* ifname)
|
||||
{
|
||||
errno = ENODEV;
|
||||
return -1;
|
||||
}
|
||||
|
||||
char* if_indextoname([[maybe_unused]] unsigned int ifindex, [[maybe_unused]] char* ifname)
|
||||
{
|
||||
errno = ENXIO;
|
||||
return nullptr;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue