mirror of
https://github.com/FEX-Emu/FEX.git
synced 2026-10-08 03:00:35 +02:00
This follows discussions from #3413. Followup commits add clang-format file, script and blame ignore lists.
23 lines
511 B
C++
23 lines
511 B
C++
// SPDX-License-Identifier: MIT
|
|
#pragma once
|
|
|
|
#include <FEXCore/Utils/Allocator.h>
|
|
#include <FEXCore/Utils/LogManager.h>
|
|
#include <FEXCore/fextl/fmt.h>
|
|
#include <FEXCore/fextl/string.h>
|
|
|
|
#include <fcntl.h>
|
|
#include <filesystem>
|
|
#include <linux/limits.h>
|
|
#include <optional>
|
|
#include <unistd.h>
|
|
|
|
namespace FEX {
|
|
|
|
inline int get_fdpath(int fd, char* SymlinkPath) {
|
|
auto Path = fextl::fmt::format("/proc/self/fd/{}", fd);
|
|
return readlinkat(AT_FDCWD, Path.c_str(), SymlinkPath, PATH_MAX);
|
|
}
|
|
|
|
} // namespace FEX
|