From nobody Wed Mar 27 19:23:01 2024 X-Original-To: dev-commits-src-all@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 4V4c5K5Td8z5BLPs; Wed, 27 Mar 2024 19:23:01 +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 4V4c5K4ZVdz4dhn; Wed, 27 Mar 2024 19:23:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711567381; 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=8dtpEv05/0WVh1bvQdOvExpqr6vehXShVuaTYFg1l/A=; b=OZQEAU6FG5efhEJmDqf2cZbGTYBLMoMp6HSnhPGF8ITI3EwO0MVgYizU4v0GpATrIQXwsI Ln0w+E7QfWj61HLH4KWzJc3ANQWFU8sKL8/yXou5XJcCY7slrsilI/hH41+pGW5vuRKmW2 tBBPaDKpey2Wny01WUKaIRG8yLTo11MKvDYl8oqqXo6cN0+Lfx5Zx+Lezr5BB9B3ACk4jf cEjHuX/wAx0QXKCUKfl4X1Df1w0HnjZ3lT7Nj9Jhauy5egrEPOFAF1uxvySQ6apOdfVo5+ C3SxVB4jlsQ1cawOwc91ivW9p+B4hYU882+9snaE2gfaziPf/MTjN5kp88Icpw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1711567381; a=rsa-sha256; cv=none; b=qPH2DYRf7LoJsxF8aMZ+sZdnXowjxUVbRte9vYI3WIZSnNQAFKkwbtpqyTMBvOsBkchhn2 0lPjqPZS0SaeNckfrqBmGK9Q/mNYuTDn09LLYvvI6FDyPZUY0n0K32a2LovRcsfjpTG5L2 hPBIryvZdWjqXUlM+LzDZST8/qbxYoT7+NK+4swnDEfqm8F/6U2VGGE8IHDX9GU9ge4AFE FQnuO26lKax+ffrC+daG/itCRHFUL6VRzSlKqOozKV3DSrx4sqORhklw2Pcz4pxtDsq5NM f/WtnKXkohsmE7qgkreDtrgxvBmZpiu/btdsBNW1FwVy6nWjQ7HVs84H56h17w== 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=1711567381; 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=8dtpEv05/0WVh1bvQdOvExpqr6vehXShVuaTYFg1l/A=; b=fTlk7PwTWHHPgqcWIMDKdFI2za5yloXX6jD6NocBeYVQBoup39Rmc4u4p2GSTDto/cvFqc wavDbizfYBMsUOxmoLropbfcE7NyzfhUgK0vx1sw1+/ptXLck9llSRiMP14mdMLgjhjm72 r5clVg7AL09R40GqW/mQWDOVg/alQ267pZ542PEEUL5t78JuCWK+7xwnGhoyWLZbGlgetH hsHZ8OWqTtwowU64RzeE40icPMog6yIKGMxllNN4bwJTFbmcZPZZN3FIJUGmIm2X92UdRj KpQkU9Qw/sJ5gjKGtXUfXsLHDYJvvm6CVE02A432eYPhoBqhEKeSQ9oiqDAs/Q== 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 4V4c5K49rlzwjn; Wed, 27 Mar 2024 19:23:01 +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 42RJN1i7016709; Wed, 27 Mar 2024 19:23:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42RJN1WV016706; Wed, 27 Mar 2024 19:23:01 GMT (envelope-from git) Date: Wed, 27 Mar 2024 19:23:01 GMT Message-Id: <202403271923.42RJN1WV016706@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: 3fa957840354 - main - sockets: define shutdown(2) constants in cpp namespace List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3fa957840354bb476c2f990b72cb2ee7339ac328 Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=3fa957840354bb476c2f990b72cb2ee7339ac328 commit 3fa957840354bb476c2f990b72cb2ee7339ac328 Author: Gleb Smirnoff AuthorDate: 2024-03-27 19:19:44 +0000 Commit: Gleb Smirnoff CommitDate: 2024-03-27 19:22:10 +0000 sockets: define shutdown(2) constants in cpp namespace There is software that uses SHUT_RD, SHUT_WR as preprocessor defines and its build was broken by enum declaration. Keep the enum, but provide defines to propagate the constants to cpp namespace. PR: 277994 PR: 277995 Fixes: c3276e02beab825824e3147b31af33af66298430 --- sys/sys/socket.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/sys/socket.h b/sys/sys/socket.h index 91fafdec672a..9d46dac376d7 100644 --- a/sys/sys/socket.h +++ b/sys/sys/socket.h @@ -629,8 +629,11 @@ struct omsghdr { */ enum shutdown_how { SHUT_RD = 0, /* shut down the reading side */ +#define SHUT_RD SHUT_RD SHUT_WR, /* shut down the writing side */ +#define SHUT_WR SHUT_WR SHUT_RDWR /* shut down both sides */ +#define SHUT_RDWR SHUT_RDWR }; #if __BSD_VISIBLE