From owner-svn-src-all@freebsd.org Mon Sep 14 23:27:51 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CD7983E4E4F; Mon, 14 Sep 2020 23:27:51 +0000 (UTC) (envelope-from imp@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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Br2bC4rNVz4Sb5; Mon, 14 Sep 2020 23:27:51 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 857AC1EE12; Mon, 14 Sep 2020 23:27:51 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08ENRpss020500; Mon, 14 Sep 2020 23:27:51 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08ENRpCC020499; Mon, 14 Sep 2020 23:27:51 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202009142327.08ENRpCC020499@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Mon, 14 Sep 2020 23:27:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r365734 - head/sys/sys X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/sys X-SVN-Commit-Revision: 365734 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Sep 2020 23:27:51 -0000 Author: imp Date: Mon Sep 14 23:27:51 2020 New Revision: 365734 URL: https://svnweb.freebsd.org/changeset/base/365734 Log: Tweak what's visible in the standalone environment. We define offsetof in stand.h typically, but when this is included we can define it multiple times. However, we don't define bool in stand.h at the moment, so allow it to be defined inside types.h when we're building for the standalone environment. MFC After: 3 days Modified: head/sys/sys/types.h Modified: head/sys/sys/types.h ============================================================================== --- head/sys/sys/types.h Mon Sep 14 22:42:17 2020 (r365733) +++ head/sys/sys/types.h Mon Sep 14 23:27:51 2020 (r365734) @@ -292,6 +292,10 @@ typedef __uint64_t uoff_t; typedef char vm_memattr_t; /* memory attribute codes */ typedef struct vm_page *vm_page_t; +#define offsetof(type, field) __offsetof(type, field) +#endif /* _KERNEL */ + +#if defined(_KERNEL) || defined(_STANDALONE) #if !defined(__bool_true_false_are_defined) && !defined(__cplusplus) #define __bool_true_false_are_defined 1 #define false 0 @@ -301,10 +305,7 @@ typedef int _Bool; #endif typedef _Bool bool; #endif /* !__bool_true_false_are_defined && !__cplusplus */ - -#define offsetof(type, field) __offsetof(type, field) - -#endif /* _KERNEL */ +#endif /* KERNEL || _STANDALONE */ /* * The following are all things that really shouldn't exist in this header,