Add missing includes and link dependencies for GCC 16

GCC 16 on Arch Linux no longer implicitly includes certain standard
headers. This causes 'not declared' errors for POSIX functions.

- PiPedalCommon/src/CMakeLists.txt: Link asound library for ALSA sequencer
- DBusDispatcher.cpp: Add <unistd.h> for read()/write()/close()
- AuxInTest.cpp: Add <unistd.h> for sleep()
- kconfigMain.cpp: Add <unistd.h> for getuid()
- ModFileTypes.cpp: Add <mutex> for std::mutex/std::lock_guard
This commit is contained in:
FoolHen
2026-06-08 12:28:17 +02:00
parent 1e41850bec
commit 9f20457f21
5 changed files with 5 additions and 1 deletions
+1 -1
View File
@@ -97,7 +97,7 @@ add_library(PiPedalCommon STATIC
ss.hpp
)
target_include_directories(PiPedalCommon PUBLIC "include" ${LIBNL3_INCLUDE_DIRS})
target_link_libraries(PiPedalCommon PUBLIC ${LIBNL3_LIBRARIES} sdbus-c++-objlib
target_link_libraries(PiPedalCommon PUBLIC ${LIBNL3_LIBRARIES} sdbus-c++-objlib asound
)
+1
View File
@@ -3,6 +3,7 @@
#include <sdbus-c++/IConnection.h>
#include <poll.h>
#include <sys/eventfd.h>
#include <unistd.h>
#include "ss.hpp"
#include <chrono>
#include <cassert>
+1
View File
@@ -19,6 +19,7 @@
#include "AuxIn.hpp"
#include <unistd.h>
using namespace pipedal;
int main(int argc, char**argv) {
+1
View File
@@ -21,6 +21,7 @@
#include "util.hpp"
#include <stdexcept>
#include <iostream>
#include <mutex>
#include "ss.hpp"
#include "MimeTypes.hpp"
+1
View File
@@ -55,6 +55,7 @@
#include <atomic>
#include "BootConfig.hpp"
#include <array>
#include <unistd.h>
#include "CommandLineParser.hpp"
#include "PrettyPrinter.hpp"
#include "SysExec.hpp"