[libc-commits] [libc] [libc] Add SCM_TIMESTAMP constants (PR #232688)

Pavel Labath via libc-commits libc-commits at lists.llvm.org
Fri Oct 16 04:15:38 PDT 2026


https://github.com/labath created https://github.com/llvm/llvm-project/pull/232688

These are the control message types for SO_TIMESTAMP, SO_TIMESTAMPNS, and SO_TIMESTAMPING. On Linux, they are defined as aliases for their SO_ counterparts.

Assisted-by: Gemini

>From bcdb5599c9f19f4a75b03987190bcd2b040d1005 Mon Sep 17 00:00:00 2001
From: Pavel Labath <pavel at labath.sk>
Date: Fri, 16 Oct 2026 11:04:59 +0000
Subject: [PATCH] [libc] Add SCM_TIMESTAMP constants

These are the control message types for SO_TIMESTAMP, SO_TIMESTAMPNS,
and SO_TIMESTAMPING. On Linux, they are defined as aliases for their
SO_ counterparts.

Assisted-by: Gemini
---
 libc/include/llvm-libc-macros/linux/sys-socket-macros.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/libc/include/llvm-libc-macros/linux/sys-socket-macros.h b/libc/include/llvm-libc-macros/linux/sys-socket-macros.h
index 2c7d55c1143284..0ee66284427d88 100644
--- a/libc/include/llvm-libc-macros/linux/sys-socket-macros.h
+++ b/libc/include/llvm-libc-macros/linux/sys-socket-macros.h
@@ -143,6 +143,9 @@
 #define SHUT_RDWR 2
 
 #define SCM_RIGHTS 1
+#define SCM_TIMESTAMP SO_TIMESTAMP
+#define SCM_TIMESTAMPNS SO_TIMESTAMPNS
+#define SCM_TIMESTAMPING SO_TIMESTAMPING
 
 #define MSG_OOB 0x01
 #define MSG_PEEK 0x02



More information about the libc-commits mailing list