From nobody Thu Nov 28 11:42:02 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1693266318; cv=none; d=zohomail.com; s=zohoarc; b=bnwSR1VLhDkBw5CNCY7KIHp3B/EZq+Z7vIRKmsC0QHr9bVIp/Avgry+dFWQMCBTNWDmkETDOTramb03g8NmFxpnj/njXqxV9gKF5QKfB45ImeredViYnhNCA28lz7KBSWczk9RM5cSxJ7HjpiC7iNufy5o4+2rHzo5JKBMfNkyY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1693266318; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=vPIB6HdkWJYoYxy/vDMHclCeIpDJl74Je8/wClovGdA=; b=adr7JeqE0moYhcbR/5f0aFt0HODGcOWJgQfa9nY8N4U80nKXDf5TVKIZ8m8g3lpGGGNRi7KX+YYEg3xKJj1uoRfb0mvYJ9RyF8T4e5yxZU3sygauOc/Wi0g1t9Yvc9tScaGDNz9dSaihC2HHurhrYXVNmLVB98FpkneL9ATVbqw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1693266318610765.9167344234039; Mon, 28 Aug 2023 16:45:18 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qalrn-0003ha-D1; Mon, 28 Aug 2023 19:41:55 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qalrf-0003fD-W6 for qemu-devel@nongnu.org; Mon, 28 Aug 2023 19:41:48 -0400 Received: from mail-io1-xd2c.google.com ([2607:f8b0:4864:20::d2c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qalrc-0006gC-36 for qemu-devel@nongnu.org; Mon, 28 Aug 2023 19:41:47 -0400 Received: by mail-io1-xd2c.google.com with SMTP id ca18e2360f4ac-79277cfc73bso143408639f.1 for ; Mon, 28 Aug 2023 16:41:43 -0700 (PDT) Received: from dune.bsdimp.com (50-253-99-174-static.hfc.comcastbusiness.net. [50.253.99.174]) by smtp.gmail.com with ESMTPSA id t9-20020a056e02060900b0034b58dd5694sm2805491ils.15.2023.08.28.16.41.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Aug 2023 16:41:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20221208.gappssmtp.com; s=20221208; t=1693266102; x=1693870902; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=vPIB6HdkWJYoYxy/vDMHclCeIpDJl74Je8/wClovGdA=; b=J1xPAnZtbivMxziqLnNbrjl140bVNANmqOdWpJT0PrXCfq2C2Bf9RqyoHlBjiCaP3M FCk0JDTHEvnMtsmpIkBqKTVEQX04vXmgg4TApHALdSNcbuSeIP4zLpG2P99XjlfrmGtc DfbcHPXJN0L9s2bVIZRR+tDsW7EtHbvkmM31mlAnNhx4N1k+22vF/iaGC3Q+q3a1OKJH rxQiSHAVbFqcJOV8amJ3dIwUDvPAMUj6QH2T9MzCOnBws86WiqETvJcB3nEvB+MTfoqz P3r0JYG29SZRV4frkZ8GDTulsIYn8Jcp0QI0aPZcmqy0QC6v+LW9rhbsIcY/7UxXaKQu a1qQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693266102; x=1693870902; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=vPIB6HdkWJYoYxy/vDMHclCeIpDJl74Je8/wClovGdA=; b=asTMnVgkn2QpwY5X6iBM6kkmOX2u86g71BMRAzocWGt8aiUJ1zFQL6A9GrruL4TVnB Q1S/43OGZLmeoWFEG1WSrAICl5sFM1sC/nBv92ZtVMU1VxeTihDDw+WrwcQcyvHtOZMf 9bq83aG1GPBl20f4k5u8RxY1j19CQut88SjfyhpqlHY1cxSHOHAodAytrc7OeUVbQ4li 6iKo9nl3it0EUVOEN8JDctUYx33ri9OeziIKcOqQpiDWk0PRt2JvIbp6r+rqjZO6Hoc0 cRHLZyZgtuWT2hFVn2nwcADMX8XMZHvR2yFJb079LzHTCrYUzazxHUN2gwS71IsK8nWN yg5g== X-Gm-Message-State: AOJu0YzR9+rE2n+bj/eue8ee0+5qOBAojA2C0uTg9mgx9NM4z9tcjO1c nXausLOYJ9G3YTxboA3qOx40v00cGQCWh2VrjWU= X-Google-Smtp-Source: AGHT+IF0OBd/VZ6gkWjjjd0jB0Zy6wuL36Lmb0VNx/KdQtD4eybWFaQhWerKuRF9dBpEwDCV0gSnbg== X-Received: by 2002:a05:6e02:12e2:b0:34c:ecc8:98e0 with SMTP id l2-20020a056e0212e200b0034cecc898e0mr7655968iln.11.1693266102343; Mon, 28 Aug 2023 16:41:42 -0700 (PDT) From: Warner Losh To: qemu-devel@nongnu.org Cc: Reinoud Zandijk , Warner Losh , Ryo ONODERA , Kyle Evans , Karim Taha , Richard Henderson Subject: [PULL 04/36] bsd-user: Move _WANT_FREEBSD macros to include/qemu/osdep.h Date: Mon, 28 Aug 2023 17:37:49 -0600 Message-ID: <20230828233821.43074-5-imp@bsdimp.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230828233821.43074-1-imp@bsdimp.com> References: <20230828233821.43074-1-imp@bsdimp.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: none client-ip=2607:f8b0:4864:20::d2c; envelope-from=imp@bsdimp.com; helo=mail-io1-xd2c.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @bsdimp-com.20221208.gappssmtp.com) X-ZM-MESSAGEID: 1693266319493100003 Content-Type: text/plain; charset="utf-8" move _WANT_FREEBSD macros from bsd-user/freebsd/os-syscall.c to include/qemu/osdep.h in order to pull some struct defintions needed later in the build. Signed-off-by: Warner Losh Signed-off-by: Karim Taha Acked-by: Richard Henderson --- bsd-user/freebsd/os-syscall.c | 11 ----------- include/qemu/osdep.h | 13 +++++++++++++ 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/bsd-user/freebsd/os-syscall.c b/bsd-user/freebsd/os-syscall.c index de36c4b71c6..2224a280ea2 100644 --- a/bsd-user/freebsd/os-syscall.c +++ b/bsd-user/freebsd/os-syscall.c @@ -17,17 +17,6 @@ * You should have received a copy of the GNU General Public License * along with this program; if not, see . */ - -/* - * We need the FreeBSD "legacy" definitions. Rust needs the FreeBSD 11 sys= tem - * calls since it doesn't use libc at all, so we have to emulate that desp= ite - * FreeBSD 11 being EOL'd. - */ -#define _WANT_FREEBSD11_STAT -#define _WANT_FREEBSD11_STATFS -#define _WANT_FREEBSD11_DIRENT -#define _WANT_KERNEL_ERRNO -#define _WANT_SEMUN #include "qemu/osdep.h" #include "qemu/cutils.h" #include "qemu/path.h" diff --git a/include/qemu/osdep.h b/include/qemu/osdep.h index 21ef8f16995..2cae135280c 100644 --- a/include/qemu/osdep.h +++ b/include/qemu/osdep.h @@ -88,6 +88,19 @@ QEMU_EXTERN_C int daemon(int, int); #define __USE_MINGW_ANSI_STDIO 1 #endif =20 +/* + * We need the FreeBSD "legacy" definitions. Rust needs the FreeBSD 11 sys= tem + * calls since it doesn't use libc at all, so we have to emulate that desp= ite + * FreeBSD 11 being EOL'd. + */ +#ifdef __FreeBSD__ +#define _WANT_FREEBSD11_STAT +#define _WANT_FREEBSD11_STATFS +#define _WANT_FREEBSD11_DIRENT +#define _WANT_KERNEL_ERRNO +#define _WANT_SEMUN +#endif + #include #include #include --=20 2.41.0