mirror of
https://github.com/ruby/ruby.git
synced 2026-08-05 11:19:10 +08:00
Inspect socket credentials only when the structures are defined
Specifically, on macOS, while `SCM_CREDS` is defined, the definition of `struct cmsgcred` is disabled.
This commit is contained in:
parent
fda83cd2d6
commit
403200c900
Notes:
git
2026-07-21 09:26:33 +00:00
@ -706,8 +706,14 @@ anc_inspect_passcred_credentials(int level, int type, VALUE data, VALUE ret)
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(SCM_CREDS)
|
||||
#define INSPECT_SCM_CREDS
|
||||
#if !defined(SCM_CREDS)
|
||||
#elif defined(HAVE_TYPE_STRUCT_CMSGCRED) /* FreeBSD */
|
||||
# define INSPECT_SCM_CREDS
|
||||
#elif defined(HAVE_TYPE_STRUCT_SOCKCRED) /* FreeBSD, NetBSD */
|
||||
# define INSPECT_SCM_CREDS
|
||||
#endif
|
||||
|
||||
#ifdef INSPECT_SCM_CREDS
|
||||
static int
|
||||
anc_inspect_socket_creds(int level, int type, VALUE data, VALUE ret)
|
||||
{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user