aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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_ */