[libc-commits] [PATCH] D149622: [libc] add socket function
Siva Chandra via Phabricator via libc-commits
libc-commits at lists.llvm.org
Mon May 1 18:14:04 PDT 2023
sivachandra added a comment.
LGTM but I have left a few minor comments.
================
Comment at: libc/include/llvm-libc-macros/linux/sys-socket-macros.h:26
+#define SOCK_SEQPACKET 5
+#define SOCK_PACKET 10
+
----------------
Can add some documentation about the origin of these numbers?
================
Comment at: libc/include/llvm-libc-types/struct_sockaddr.h:16
+ sa_family_t sa_family;
+ char sa_data[14];
+}
----------------
Same here - documentation for why 14.
================
Comment at: libc/src/sys/socket/linux/socket.cpp:16
+
+#include <linux/net.h> // For socketcall numbers.
+#include <sys/syscall.h> // For syscall numbers.
----------------
`For SYS_SOCKET socketcall call number.` ?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D149622/new/
https://reviews.llvm.org/D149622
More information about the libc-commits
mailing list