Skip to content

Commit

Permalink
LibCore: Fix Notifier.cpp compilation errors on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
stasoid committed Nov 16, 2024
1 parent dfe2c0d commit c3105a3
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
5 changes: 5 additions & 0 deletions Libraries/LibCore/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -110,3 +110,8 @@ endif()
if (ANDROID)
target_link_libraries(LibCore PRIVATE log)
endif()

if (WIN32)
find_path(PTHREAD_INCLUDE_DIR pthread.h REQUIRED)
target_include_directories(LibCore PRIVATE ${PTHREAD_INCLUDE_DIR})
endif()
2 changes: 1 addition & 1 deletion Libraries/LibCore/Notifier.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class Notifier final : public EventReceiver {

int m_fd { -1 };
bool m_is_enabled { false };
pthread_t m_owner_thread { 0 };
pthread_t m_owner_thread {};
Type m_type { Type::None };
};

Expand Down
4 changes: 4 additions & 0 deletions vcpkg.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,10 @@
"simd"
]
},
{
"name": "pthread",
"platform": "windows"
},
"simdutf",
{
"name": "skia",
Expand Down

0 comments on commit c3105a3

Please sign in to comment.