Skip to content

Commit 16da3c9

Browse files
yneRinnegatamante
authored andcommitted
Add missing INADDR_* macro (#24)
Useful when binding listening socket
1 parent 50f181f commit 16da3c9

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

  • newlib/libc/sys/vita/include/netinet

newlib/libc/sys/vita/include/netinet/in.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,12 @@ struct sockaddr_in {
5555
char sin_zero[6];
5656
} sockaddr_in;
5757

58+
/* Address to accept any incoming messages. */
59+
#define INADDR_ANY ((in_addr_t) 0x00000000)
60+
61+
/* Address to send to all hosts. */
62+
#define INADDR_BROADCAST ((in_addr_t) 0xffffffff)
63+
5864
#define ntohs __builtin_bswap16
5965
#define htons __builtin_bswap16
6066
#define ntohl __builtin_bswap32

0 commit comments

Comments
 (0)