From 1cdcc48d4e8ef9bdde1f6592c213da6e5b2d6000 Mon Sep 17 00:00:00 2001 From: Kevin Day Date: Fri, 29 Jul 2022 19:22:10 -0500 Subject: [PATCH] Bugfix: private_f_file_open_at() has an incomplete set if ifdef conditions. The ifdef conditions for disabled functions is incomplete. This results in the private_f_file_open_at() becoming incorrectly unavailable when the appropriate disable defines are set. --- level_0/f_file/c/private-file.c | 4 ++-- level_0/f_file/c/private-file.h | 7 +++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/level_0/f_file/c/private-file.c b/level_0/f_file/c/private-file.c index b9e5b13..08ec107 100644 --- a/level_0/f_file/c/private-file.c +++ b/level_0/f_file/c/private-file.c @@ -547,7 +547,7 @@ extern "C" { } #endif // !defined(_di_f_file_open_) || !defined(_di_f_file_copy_) -#if !defined(_di_f_file_open_at_) || !defined(_di_f_file_copy_at_) +#if !defined(_di_f_file_copy_at_) || !defined(_di_f_file_clone_at_) || !defined(_di_f_file_open_at_) || !defined(_di_f_file_copy_at_) f_status_t private_f_file_open_at(const int at_id, const f_string_static_t path, const mode_t mode, f_file_t * const file) { file->id = openat(at_id, path.string, file->flag, mode); @@ -579,7 +579,7 @@ extern "C" { return F_none; } -#endif // !defined(_di_f_file_open_at_) || !defined(_di_f_file_copy_at_) +#endif // !defined(_di_f_file_copy_at_) || !defined(_di_f_file_clone_at_) || !defined(_di_f_file_open_at_) || !defined(_di_f_file_copy_at_) #if !defined(_di_f_file_role_change_) || !defined(_di_f_file_copy_) f_status_t private_f_file_role_change(const f_string_static_t path, const uid_t uid, const gid_t gid, const bool dereference) { diff --git a/level_0/f_file/c/private-file.h b/level_0/f_file/c/private-file.h index 9ec34e0..14ff1df 100644 --- a/level_0/f_file/c/private-file.h +++ b/level_0/f_file/c/private-file.h @@ -747,11 +747,14 @@ extern "C" { * * @see openat() * + * @see f_file_copy_at() + * @see f_file_clone_at() * @see f_file_open_at() + * @see f_file_copy_at() */ -#if !defined(_di_f_file_open_at_) +#if !defined(_di_f_file_copy_at_) || !defined(_di_f_file_clone_at_) || !defined(_di_f_file_open_at_) || !defined(_di_f_file_copy_at_) extern f_status_t private_f_file_open_at(const int at_id, const f_string_static_t path, const mode_t mode, f_file_t * const file) F_attribute_visibility_internal_d; -#endif // !defined(_di_f_file_open_at_) +#endif // !defined(_di_f_file_copy_at_) || !defined(_di_f_file_clone_at_) || !defined(_di_f_file_open_at_) || !defined(_di_f_file_copy_at_) /** * Private implementation of f_file_role_change(). -- 1.8.3.1