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:		c3276e02be
This commit is contained in:
Gleb Smirnoff 2024-03-27 12:19:44 -07:00
parent c92400a6f6
commit 3fa9578403

View file

@ -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