aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Moffett <ian@osmora.org>2024-05-19 19:08:13 -0400
committerIan Moffett <ian@osmora.org>2024-05-19 19:14:13 -0400
commitddfedec2f91aa67cfc060ab35398e08ec1b1e37d (patch)
tree3144aa55ac559d341b42ac14c5c7d2429724ec8d
parent549c7d116fe06cad3a39b38d187daf87ddd22ac7 (diff)
build: Export sys/tty.h
Signed-off-by: Ian Moffett <ian@osmora.org>
-rw-r--r--builddeps/sysexports1
-rw-r--r--sys/include/sys/tty.h7
2 files changed, 6 insertions, 2 deletions
diff --git a/builddeps/sysexports b/builddeps/sysexports
index 626cc6c..7069c57 100644
--- a/builddeps/sysexports
+++ b/builddeps/sysexports
@@ -7,5 +7,6 @@ sys_headers=$(cat <<END
queue.h
signal.h
termios.h
+ tty.h
END
)
diff --git a/sys/include/sys/tty.h b/sys/include/sys/tty.h
index 342a1a7..a4595d5 100644
--- a/sys/include/sys/tty.h
+++ b/sys/include/sys/tty.h
@@ -30,14 +30,16 @@
#ifndef _SYS_TTY_H_
#define _SYS_TTY_H_
-#include <sys/types.h>
#include <sys/termios.h>
+#if defined(_KERNEL)
+#include <sys/types.h>
#include <sys/spinlock.h>
#include <sys/device.h>
#include <dev/vcons/vcons.h>
+#endif
+#if defined(_KERNEL)
#define TTY_RING_SIZE 32
-
#define TTY_SOURCE_RAW 0x0001U /* Raw text */
#define TTY_SOURCE_DEV 0x0002U /* Input from device (e.g keyboard) */
@@ -64,4 +66,5 @@ int tty_putc(struct tty *tty, int c, int flags);
int tty_putstr(struct tty *tty, const char *s, size_t count);
ssize_t tty_flush(struct tty *tty);
+#endif /* defined(_KERNEL) */
#endif /* !_SYS_TTY_H_ */