diff --git a/Userland/Applications/Piano/CMakeLists.txt b/Userland/Applications/Piano/CMakeLists.txt index 19717985e88..60a49f77315 100644 --- a/Userland/Applications/Piano/CMakeLists.txt +++ b/Userland/Applications/Piano/CMakeLists.txt @@ -21,4 +21,4 @@ set(SOURCES ) serenity_app(Piano ICON app-piano) -target_link_libraries(Piano LibAudio LibDSP LibGUI) +target_link_libraries(Piano LibAudio LibDSP LibGUI LibMain) diff --git a/Userland/Applications/Piano/main.cpp b/Userland/Applications/Piano/main.cpp index fec6390aa92..53f322e393a 100644 --- a/Userland/Applications/Piano/main.cpp +++ b/Userland/Applications/Piano/main.cpp @@ -22,15 +22,14 @@ #include #include #include +#include +#include -int main(int argc, char** argv) +ErrorOr serenity_main(Main::Arguments arguments) { - if (pledge("stdio thread rpath cpath wpath recvfd sendfd unix", nullptr) < 0) { - perror("pledge"); - return 1; - } + TRY(System::pledge("stdio thread rpath cpath wpath recvfd sendfd unix", nullptr)); - auto app = GUI::Application::construct(argc, argv); + auto app = GUI::Application::construct(arguments.argc, arguments.argv); TrackManager track_manager;