From 287efc59237716807ffdd9d4618747537a7a2143 Mon Sep 17 00:00:00 2001 From: Antonio SJ Musumeci Date: Tue, 6 Feb 2024 23:26:34 -0600 Subject: [PATCH] fs_openat.hpp --- src/fs_openat.hpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/fs_openat.hpp b/src/fs_openat.hpp index 9448d8ac..477f1df6 100644 --- a/src/fs_openat.hpp +++ b/src/fs_openat.hpp @@ -38,4 +38,19 @@ namespace fs return ((rv == -1) ? -errno : rv); } + + static + inline + int + openat(const int dirfd_, + const char *pathname_, + const int flags_, + const mode_t mode_) + { + int rv; + + rv = ::openat(dirfd_,pathname_,flags_); + + return ((rv == -1) ? -errno : rv); + } }