From nobody Wed Sep 06 01:38:17 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RgQ4T3bnpz4srMC; Wed, 6 Sep 2023 01:38:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RgQ4T38Ftz3cCL; Wed, 6 Sep 2023 01:38:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1693964297; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IzmeVWV49OvJyd5a/phkrSxKWbhbFgsxMamRE/dGdzY=; b=myLFAOPCEjGup7ZI061wqOiU5yG5xECUks0qkHnCE4pwlRgBLx9iaTlqeqHMXVOBQ2FaGY XKQXv1r9O4fjmxUlgkP8NaBdySIgGFLEsdwv2fBdpxYQSJQ422bydwjrFReDlz7Hl0Hlta xoAurfkCf9Jxc3ngc2LQItx1aiYHarTfEXCpTJGszsYmPmfJ+rXVTXxfVxwUYDWyz1eHZG LeK6q0rlRE6856kvMKQLz20AvQs+oFdnc1X7TuvJXa/tKQ98nSUEZ0Rpfq0/aJeDPyhvCR zNU8ZCTrbLIRnaSOvHADg9tXZxS5wobF+uu57sBzFKPe+k1/cZjOwI/5cAUfhQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1693964297; a=rsa-sha256; cv=none; b=NJ5qmEUjm7GsCXbVIvh2czPKqtDgR7QoPv5iHSn3dT0+YTqsTKy8z6WO+qBxKRmh48j9y8 wiS2uQBcLTVysFzm0WeX2Ak6CiIKkWio6h4nnHwmzoOaAXM+nvlHK8oDtfNF3UC/k4GSVT JEwHuwwjnz1kdLdEAPZ+UTIlUyLmv8KlvZ8QnIvK/8Jm9RaweKNdZuXlL8mayV0JAPgNnT EAyLCF9HPN+WKpgp3npG5hferfbH2yffta8koxDmpLaXw4C1m+7NmmdMngjk0lrUYaWauK CXHi14WmHI/iLoCjQX9iZSvQUNt5ttgI3KmRx+9buoCXvBO6YGpQ44ZHvVdWWQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1693964297; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IzmeVWV49OvJyd5a/phkrSxKWbhbFgsxMamRE/dGdzY=; b=nspjBOLCAHVXgrMOjStNusm+mDckHaD4AG9V1u9/yBbPUoCC+wUv41tEaasjDuLSRcUCUd 1WIJUkVkdoO8hAdNpA/KHoiVCqglTIEU1JFZFPYAYiCVHlKZ4NR4xQvANk0dzLkmCl7m2o 3rMAbf+QjT+/WDu1zwNIT1VSq0wRxedScJ380kMp47aFuRkKuE0dwaXqkPuGpba5mux75w r1JknGj0AGImyCNmf0phx8AAQinvp767S2cWS4svM2gPSAHYQdYxNAwnVCnvS1kzdmb1KV 1MH1SJ+a2ZlPSgVZzvU01pol2Swum78EatVhS9/4VyaOnxOFKMR1CZ/dCWcEfg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RgQ4T2F6tzwqg; Wed, 6 Sep 2023 01:38:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3861cHu9088855; Wed, 6 Sep 2023 01:38:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3861cHIc088852; Wed, 6 Sep 2023 01:38:17 GMT (envelope-from git) Date: Wed, 6 Sep 2023 01:38:17 GMT Message-Id: <202309060138.3861cHIc088852@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: 8091b82e2916 - main - time.h: Fix visibility check for C11 and C23 features. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8091b82e291642f3034dc3fdc8689a4f4ba027da Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=8091b82e291642f3034dc3fdc8689a4f4ba027da commit 8091b82e291642f3034dc3fdc8689a4f4ba027da Author: Dag-Erling Smørgrav AuthorDate: 2023-09-06 01:37:43 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2023-09-06 01:38:01 +0000 time.h: Fix visibility check for C11 and C23 features. __BSD_VISIBLE is always defined; we need to check if it's true. Fixes: d02489d11aed 9b5d724cad10 MFC after: 3 days Reviewed by: brooks, imp Differential Revision: https://reviews.freebsd.org/D41733 --- include/time.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/time.h b/include/time.h index ef55577a2f84..ff858cc1f420 100644 --- a/include/time.h +++ b/include/time.h @@ -179,13 +179,13 @@ time_t posix2time(time_t t); #include #endif -#if defined(__BSD_VISIBLE) || __ISO_C_VISIBLE >= 2011 || \ +#if __BSD_VISIBLE || __ISO_C_VISIBLE >= 2011 || \ (defined(__cplusplus) && __cplusplus >= 201703) #include /* ISO/IEC 9899:2011 7.27.2.5 The timespec_get function */ #define TIME_UTC 1 /* time elapsed since epoch */ int timespec_get(struct timespec *ts, int base); -#if defined (__BSD_VISIBLE) || __ISO_C_VISIBLE >= 2023 +#if __BSD_VISIBLE || __ISO_C_VISIBLE >= 2023 /* ISO/IEC 9899:2024 7.29.1 Components of time */ #define TIME_MONOTONIC 2 /* monotonic time */ /* ISO/IEC 9899:2024 7.29.2.7 The timespec_getres function */