From dcbc117464c24526179ae386f64556b11e4d4285 Mon Sep 17 00:00:00 2001 From: telcharr Date: Sat, 13 Jun 2026 17:01:28 -0400 Subject: [PATCH] add SSIZE_MAX constant for unix targets --- libc-test/semver/unix.txt | 1 + src/unix/mod.rs | 2 ++ 2 files changed, 3 insertions(+) diff --git a/libc-test/semver/unix.txt b/libc-test/semver/unix.txt index 052c24178dfcc..6d23ae4338553 100644 --- a/libc-test/semver/unix.txt +++ b/libc-test/semver/unix.txt @@ -359,6 +359,7 @@ SO_SNDBUF SO_SNDLOWAT SO_SNDTIMEO SO_TYPE +SSIZE_MAX STDERR_FILENO STDIN_FILENO STDOUT_FILENO diff --git a/src/unix/mod.rs b/src/unix/mod.rs index ff440d5a13f1c..58dbe9c4db729 100644 --- a/src/unix/mod.rs +++ b/src/unix/mod.rs @@ -247,6 +247,8 @@ cfg_if! { pub const INT_MIN: c_int = -2147483648; pub const INT_MAX: c_int = 2147483647; +pub const SSIZE_MAX: ssize_t = ssize_t::MAX; + pub const SIG_DFL: sighandler_t = 0 as sighandler_t; pub const SIG_IGN: sighandler_t = 1 as sighandler_t; pub const SIG_ERR: sighandler_t = !0 as sighandler_t;