diff options
author | Gleb Smirnoff <glebius@FreeBSD.org> | 2024-03-27 19:19:44 +0000 |
---|---|---|
committer | Gleb Smirnoff <glebius@FreeBSD.org> | 2024-03-27 19:22:10 +0000 |
commit | 3fa957840354bb476c2f990b72cb2ee7339ac328 (patch) | |
tree | 974166cc951d374830f7df2cf19a0115fecdc4a2 | |
parent | c92400a6f690a82ab84eb0b97cc8bf169e44e4e8 (diff) |
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
-rw-r--r-- | sys/sys/socket.h | 3 |
1 files changed, 3 insertions, 0 deletions
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 |