[gjs/ewlsh/nova-repl: 3/7] Update IWYU for termios.h




commit 0e39252c1bd7da151e5a8d9fa5fbc4ce0bb306c2
Author: Evan Welsh <contact evanwelsh com>
Date:   Sat Sep 4 00:49:55 2021 -0700

    Update IWYU for termios.h

 tools/gjs-private-iwyu.imp | 1 +
 util/console.cpp           | 5 +++++
 2 files changed, 6 insertions(+)
---
diff --git a/tools/gjs-private-iwyu.imp b/tools/gjs-private-iwyu.imp
index 502e6b432..842ff9fd9 100644
--- a/tools/gjs-private-iwyu.imp
+++ b/tools/gjs-private-iwyu.imp
@@ -8,6 +8,7 @@
   {"include": ["<bits/types/siginfo_t.h>", "private", "<signal.h>", "public"]},
   {"include": ["<bits/types/struct_itimerspec.h>", "private", "<time.h>", "public"]},
   {"include": ["<bits/types/timer_t.h>", "private", "<sys/types.h>", "public"]},
+  {"include": ["@<bits/termios-.*>", "private", "<termios.h>", "public"]},
 
   {"include": ["@<ffi.*>", "private", "<ffi.h>", "public"]},
   {"include": ["@\"gio/.*\"", "private", "<gio/gio.h>", "public"]},
diff --git a/util/console.cpp b/util/console.cpp
index 5489ab6be..76451ce11 100644
--- a/util/console.cpp
+++ b/util/console.cpp
@@ -11,6 +11,11 @@
 #    include <io.h>
 #endif
 
+#ifdef HAVE_TERMIOS_H
+#    include <stdlib.h>
+#    include <termios.h>
+#endif
+
 #include <glib.h>
 
 #include "util/console.h"


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]