From nobody Sun Feb 18 04:40:34 2024 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 4TctJg0JP6z5BPx3; Sun, 18 Feb 2024 04:40:35 +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 4TctJf539dz4TqL; Sun, 18 Feb 2024 04:40:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1708231234; 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=A9HqXsg3iuw7C0cEmg7OZ2MdtvCQwNeiOP/vvc64Y9g=; b=DuKyF5qarvAu2bGLgercKI6E9IjF4HbTvx0PVc7/ln1GN+74BjbCDRTMjMdwD6XVvMunv7 ctRSOF3EMXQHrCVQr/ZdC1fc3lUyzua5hAkTww4hZTjInd5hSX/0lEKcc8Ee6SWZqIpAyN 3OECdcSd3rLlYz1RRM8LgUd4wbB64Opscd0Gkd7uK5Fpunqz4iVylSI/DgU5m6sfxbz8MM +Ks7D7RFMOnaK7LCr2pmv9/93i160dLLJrdTHy5mKMpS5SYSFSaIVNIbBoJC5tGt6gS4g+ TAXBTocR95CmusmQlnZbM9ewdD4oFAmZLxgZExsl6rBOSIq+ppi1qbssmvkBlQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1708231234; 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=A9HqXsg3iuw7C0cEmg7OZ2MdtvCQwNeiOP/vvc64Y9g=; b=GdSY1bteSzJiexg2dj7LSkwGRZlMEKpflTBA9kkUQMv+7tSCg3K79ipzXSiH8KOM5j1bZJ XCX8hGzHWPYcFuByemSzH2l6DOEHMoE2hEKR1BqX2wNJQIl8OKudZ4eu7AHnPQDzOaX05I 4bdY9Baa1AiXlG6SF+8JMVk47l6Di30GmMCvfJyl8pbzxKlEfrBFZnSdFSUx9qMcqj/UsX rAx5pEEEEz1W2x5KNhV+uNL6RHdRT4Yet7iy3w/X7t7lqSLoNC2AsIYpdUoT7gsPg1fRZj NQJQBly6nOLMfVtFHQX0h9qUxxoIIUUsyHzzGKv9eYkftki5PjRMTlXodvPe7w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1708231234; a=rsa-sha256; cv=none; b=ntJPTWCq2YYGzpimzqxixlTYGYPU2DTbmbt1C5uDPBH+FLBqh1a+mFtf5ubDDRGorhuV/X M5RGXeJD3bD1umPrCChVVVv14aEyu0J0c7X+N0xgwLffTrRr8mQ9qs/pnlXXKx/xk+Ngfs 7J8q0yekc873LKsFQkJAAPe7zt1bm+4q2EBEB7sWkStiymFzk3YD0pIjjagatF8W3OTFIO P7HMAtwdcMpopGh+W7J+0re700OAy67PEF2mefDlcNRQDEPa1U+aptmrNQKeyjnzq8jJFL 01v4Tpm/dW5pQWf/KvvmFqjgWK+85CCHsTsSAbILkgtPUT5wjTvebtv4EE9t/A== 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 4TctJf47cSzcxj; Sun, 18 Feb 2024 04:40:34 +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 41I4eYLe038661; Sun, 18 Feb 2024 04:40:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41I4eYv3038658; Sun, 18 Feb 2024 04:40:34 GMT (envelope-from git) Date: Sun, 18 Feb 2024 04:40:34 GMT Message-Id: <202402180440.41I4eYv3038658@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 2546c543fd79 - main - reboot: Move extern for environ 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: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2546c543fd7955276388aae6f0869d2c9285ba59 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=2546c543fd7955276388aae6f0869d2c9285ba59 commit 2546c543fd7955276388aae6f0869d2c9285ba59 Author: Warner Losh AuthorDate: 2024-02-18 04:30:48 +0000 Commit: Warner Losh CommitDate: 2024-02-18 04:39:42 +0000 reboot: Move extern for environ envorin isn't defined in any header, and gcc is cranky with this inside a function, so move it to global scope. Both clang and gcc are now happy with this. Sponsored by: Netflix --- sbin/reboot/reboot.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sbin/reboot/reboot.c b/sbin/reboot/reboot.c index 550530ad079e..d215255487a7 100644 --- a/sbin/reboot/reboot.c +++ b/sbin/reboot/reboot.c @@ -51,6 +51,8 @@ #include #include +extern char **environ; + #define PATH_NEXTBOOT "/boot/nextboot.conf" static void usage(void) __dead2; @@ -84,7 +86,6 @@ zfsbootcfg(const char *pool, bool force) }; int rv, status; pid_t p; - extern char **environ; rv = posix_spawnp(&p, av[0], NULL, NULL, __DECONST(char **, av), environ);