Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 641c0a7

Browse files
committed
Define mutex, file_map
The statics were declared in the header but never defined in a translation unit.
1 parent c0aceed commit 641c0a7

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

fml/unique_fd.cc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ namespace internal {
1313

1414
namespace os_win {
1515

16+
std::mutex UniqueFDTraits::file_map_mutex;
17+
std::map<HANDLE, DirCacheEntry> UniqueFDTraits::file_map;
18+
1619
void UniqueFDTraits::Free_Handle(HANDLE fd) {
1720
CloseHandle(fd);
1821
}

fml/unique_fd.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ struct DirCacheEntry {
3434
// else linker error. Embedding in struct also causes linker error.
3535

3636
struct UniqueFDTraits {
37-
inline static std::mutex file_map_mutex;
38-
inline static std::map<HANDLE, DirCacheEntry> file_map;
37+
static std::mutex file_map_mutex;
38+
static std::map<HANDLE, DirCacheEntry> file_map;
3939

4040
static HANDLE InvalidValue() { return INVALID_HANDLE_VALUE; }
4141
static bool IsValid(HANDLE value) { return value != InvalidValue(); }

0 commit comments

Comments
 (0)