Skip to content

Commit

Permalink
posix-socket: add AF_UNIX define
Browse files Browse the repository at this point in the history
Fixes: #512
  • Loading branch information
lal12 authored Jun 3, 2024
1 parent 81b9919 commit 9045e2c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/types/txikijs.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -954,8 +954,12 @@ declare global {
static readonly defines: {
AF_INET: number,
AF_INET6: number,
/** only on platforms supporting AF_NETLINK */
AF_NETLINK: number,
/** only on platforms supporting AF_PACKET */
AF_PACKET: number,
/** only on platforms supporting AF_UNIX */
AF_UNIX: number,

SOCK_STREAM: number,
SOCK_DGRAM: number,
Expand Down
3 changes: 3 additions & 0 deletions src/posix-socket.c
Original file line number Diff line number Diff line change
Expand Up @@ -618,6 +618,9 @@ static const JSCFunctionListEntry defines_list[] = {
#ifdef AF_PACKET
JS_PROT_INT_DEF(AF_PACKET),
#endif
#ifdef AF_UNIX
JS_PROT_INT_DEF(AF_UNIX),
#endif

JS_PROT_INT_DEF(SOCK_STREAM),
JS_PROT_INT_DEF(SOCK_DGRAM),
Expand Down

0 comments on commit 9045e2c

Please sign in to comment.