Skip to content

Commit

Permalink
ImageDecoder: Port to Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
stasoid committed Jan 7, 2025
1 parent 314976d commit 09e6ad8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions Services/ImageDecoder/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,9 @@ target_include_directories(imagedecoderservice PRIVATE ${LADYBIRD_SOURCE_DIR}/Se

target_link_libraries(ImageDecoder PRIVATE imagedecoderservice LibCore LibMain)
target_link_libraries(imagedecoderservice PRIVATE LibCore LibGfx LibIPC LibImageDecoderClient LibMain LibThreading)

if (WIN32)
find_package(pthread REQUIRED)
target_include_directories(ImageDecoder PRIVATE ${PTHREAD_INCLUDE_DIR})
target_include_directories(imagedecoderservice PRIVATE ${PTHREAD_INCLUDE_DIR})
endif()
4 changes: 2 additions & 2 deletions Services/ImageDecoder/ConnectionFromClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ ErrorOr<IPC::File> ConnectionFromClient::connect_new_client()

auto client_socket_or_error = Core::LocalSocket::adopt_fd(socket_fds[0]);
if (client_socket_or_error.is_error()) {
close(socket_fds[0]);
close(socket_fds[1]);
(void)Core::System::close(socket_fds[0]);
(void)Core::System::close(socket_fds[1]);
return client_socket_or_error.release_error();
}

Expand Down

0 comments on commit 09e6ad8

Please sign in to comment.