From 7828d4254e7707adcb9bf7190e5c3dc7a8a7d9de Mon Sep 17 00:00:00 2001 From: Brian Gianforcaro Date: Thu, 16 Dec 2021 04:24:25 -0800 Subject: [PATCH] LibC: Stub out tcsendbreak(..) and tcdrain(..) They are required for gdb to build. --- Userland/Libraries/LibC/termios.cpp | 14 ++++++++++++++ Userland/Libraries/LibC/termios.h | 2 ++ 2 files changed, 16 insertions(+) diff --git a/Userland/Libraries/LibC/termios.cpp b/Userland/Libraries/LibC/termios.cpp index a6ca212430..291dafa659 100644 --- a/Userland/Libraries/LibC/termios.cpp +++ b/Userland/Libraries/LibC/termios.cpp @@ -30,6 +30,13 @@ int tcsetattr(int fd, int optional_actions, const struct termios* t) return -1; } +// https://pubs.opengroup.org/onlinepubs/009695399/functions/tcsendbreak.html +int tcsendbreak([[maybe_unused]] int fd, [[maybe_unused]] int duration) +{ + // FIXME: Implement this for real. + return 0; +} + int tcflow([[maybe_unused]] int fd, [[maybe_unused]] int action) { errno = EINVAL; @@ -41,6 +48,13 @@ int tcflush(int fd, int queue_selector) return ioctl(fd, TCFLSH, queue_selector); } +// https://pubs.opengroup.org/onlinepubs/009695399/functions/tcdrain.html +int tcdrain([[maybe_unused]] int fd) +{ + // FIXME: Implement this for real. + return 0; +} + speed_t cfgetispeed(const struct termios* tp) { return tp->c_ispeed; diff --git a/Userland/Libraries/LibC/termios.h b/Userland/Libraries/LibC/termios.h index 752a2c7cba..3a2382c7b9 100644 --- a/Userland/Libraries/LibC/termios.h +++ b/Userland/Libraries/LibC/termios.h @@ -10,8 +10,10 @@ __BEGIN_DECLS +int tcdrain(int fd); int tcgetattr(int fd, struct termios*); int tcsetattr(int fd, int optional_actions, const struct termios*); +int tcsendbreak(int fd, int duration); int tcflow(int fd, int action); int tcflush(int fd, int queue_selector);