From cde255c7dffdf2af9132d5014c7125c66a1d90f6 Mon Sep 17 00:00:00 2001 From: Collin Funk Date: Thu, 19 Jun 2025 15:43:49 -0700 Subject: [PATCH] man/man2/gettimeofday.2: Declare functions with [[deprecated]] As documented in the STANDARDS section, gettimeofday(2) was deprecated in POSIX.1-2008 and removed in POSIX.1-2024. Mark it and settimeofday(2) with [[deprecated]], and mention clock_settime(2) as a modern and standardized alternative to settimeofday(2). Signed-off-by: Collin Funk Message-ID: <2d37d5a9251af3c1d25cf8e73e3585a9955d5772.1750373011.git.collin.funk1@gmail.com> Signed-off-by: Alejandro Colomar --- man/man2/gettimeofday.2 | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/man/man2/gettimeofday.2 b/man/man2/gettimeofday.2 index 361a8d96a..8310f9c78 100644 --- a/man/man2/gettimeofday.2 +++ b/man/man2/gettimeofday.2 @@ -12,8 +12,10 @@ Standard C library .nf .B #include .P +.B [[deprecated]] .BI "int gettimeofday(struct timeval *restrict " tv , .BI " struct timezone *_Nullable restrict " tz ); +.B [[deprecated]] .BI "int settimeofday(const struct timeval *" tv , .BI " const struct timezone *_Nullable " tz ); .fi @@ -185,6 +187,10 @@ POSIX.1-2008 marked as obsolete, recommending the use of .BR clock_gettime (2) instead. +Likewise, +.BR clock_settime (2) +should be used instead of +.BR settimeofday (). POSIX.1-2024 removed .BR gettimeofday (). .P -- 2.47.3