1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-14 09:04:59 +00:00

LibC: Make nameinfo (NI_*) constants bitfield-friendly

These are supposed to be used as flags in a bitfield, so let's make
them powers of two.
This commit is contained in:
Andreas Kling 2022-04-21 11:09:33 +02:00
parent a353ceecf1
commit ab878576bb

View file

@ -90,11 +90,11 @@ struct addrinfo {
#define NI_MAXHOST 1025
#define NI_MAXSERV 32
#define NI_NUMERICHOST 1
#define NI_NUMERICSERV 2
#define NI_NAMEREQD 3
#define NI_NOFQDN 4
#define NI_DGRAM 5
#define NI_NUMERICHOST (1 << 0)
#define NI_NUMERICSERV (1 << 1)
#define NI_NAMEREQD (1 << 2)
#define NI_NOFQDN (1 << 3)
#define NI_DGRAM (1 << 4)
int getaddrinfo(char const* __restrict node, char const* __restrict service, const struct addrinfo* __restrict hints, struct addrinfo** __restrict res);
void freeaddrinfo(struct addrinfo* res);