mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 08:58:11 +00:00
LibC: Add in6addr_loopback and IN6ADDR_LOOPBACK_INIT constant
Much like the existing in6addr_any global and the IN6ADDR_ANY_INIT macro, our LibC is also expected to export the in6addr_loopback global and the IN6ADDR_LOOPBACK_INIT constant. These were found by the stress-ng port.
This commit is contained in:
parent
fb8df01036
commit
4fdff1ba63
2 changed files with 9 additions and 2 deletions
|
@ -95,7 +95,13 @@ struct in6_addr {
|
||||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 \
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 \
|
||||||
}
|
}
|
||||||
|
|
||||||
extern struct in6_addr in6addr_any;
|
#define IN6ADDR_LOOPBACK_INIT \
|
||||||
|
{ \
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 \
|
||||||
|
}
|
||||||
|
|
||||||
|
extern const struct in6_addr in6addr_any;
|
||||||
|
extern const struct in6_addr in6addr_loopback;
|
||||||
|
|
||||||
struct sockaddr_in6 {
|
struct sockaddr_in6 {
|
||||||
sa_family_t sin6_family; // AF_INET6.
|
sa_family_t sin6_family; // AF_INET6.
|
||||||
|
|
|
@ -8,7 +8,8 @@
|
||||||
#include <LibC/net/if.h>
|
#include <LibC/net/if.h>
|
||||||
#include <LibC/netinet/in.h>
|
#include <LibC/netinet/in.h>
|
||||||
|
|
||||||
in6_addr in6addr_any = IN6ADDR_ANY_INIT;
|
const in6_addr in6addr_any = IN6ADDR_ANY_INIT;
|
||||||
|
const in6_addr in6addr_loopback = IN6ADDR_LOOPBACK_INIT;
|
||||||
|
|
||||||
unsigned int if_nametoindex([[maybe_unused]] const char* ifname)
|
unsigned int if_nametoindex([[maybe_unused]] const char* ifname)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue