[libc-commits] [libc] [libc] Implement getsockopt and setsockopt on linux (PR #192237)

Pavel Labath via libc-commits libc-commits at lists.llvm.org
Wed Apr 15 06:41:10 PDT 2026


================
@@ -25,4 +25,22 @@
 #define SOCK_SEQPACKET 5
 #define SOCK_PACKET 10
 
+#define SOL_SOCKET 1
----------------
labath wrote:

Maybe? I don't know, I'm just trying to copy what's been done before me :)

Can the yaml file be OS-specific (and how)? While the macros are standard, their values are likely going to depend (unlike cpio.h, I suppose) on the OS. On linux at least these need to match the kernel interfaces.

If the answer to the first question is "yes", then should I also move the existing defines to the yaml file (in a separate patch, most likely).

https://github.com/llvm/llvm-project/pull/192237


More information about the libc-commits mailing list