summaryrefslogtreecommitdiffstats
path: root/abs/core/klibc-kbd/no-isatty.patch
diff options
context:
space:
mode:
authorJames Meyer <James.meyer@operamail.com>2008-10-02 03:19:12 (GMT)
committerJames Meyer <James.meyer@operamail.com>2008-10-02 03:19:12 (GMT)
commit0e2532d4e8f4eed5e047f1db54d5c03ba849ec0a (patch)
treec0aa2c0b53c317be87eacfcb77b63f53f1f415e7 /abs/core/klibc-kbd/no-isatty.patch
downloadlinhes_pkgbuild-0e2532d4e8f4eed5e047f1db54d5c03ba849ec0a.zip
linhes_pkgbuild-0e2532d4e8f4eed5e047f1db54d5c03ba849ec0a.tar.gz
linhes_pkgbuild-0e2532d4e8f4eed5e047f1db54d5c03ba849ec0a.tar.bz2
initial import
Diffstat (limited to 'abs/core/klibc-kbd/no-isatty.patch')
-rw-r--r--abs/core/klibc-kbd/no-isatty.patch58
1 files changed, 58 insertions, 0 deletions
diff --git a/abs/core/klibc-kbd/no-isatty.patch b/abs/core/klibc-kbd/no-isatty.patch
new file mode 100644
index 0000000..ce02a7a
--- /dev/null
+++ b/abs/core/klibc-kbd/no-isatty.patch
@@ -0,0 +1,58 @@
+From 92dc27dd57c83e9e2c798bda41ec111d26e1e3e2 Mon Sep 17 00:00:00 2001
+From: Roman Kyrylych <roman@archlinux.org>
+Date: Sat, 15 Mar 2008 18:57:04 +0200
+Subject: [PATCH] Do not use isatty() when built with klibc
+
+Signed-off-by: Roman Kyrylych <roman@archlinux.org>
+---
+ src/getfd.c | 6 ++++++
+ 1 files changed, 6 insertions(+), 0 deletions(-)
+
+diff --git a/src/getfd.c b/src/getfd.c
+index 7f6d70e..3cef522 100644
+--- a/src/getfd.c
++++ b/src/getfd.c
+@@ -16,6 +16,7 @@
+ * if someone else used X (which does a chown on /dev/console).
+ */
+
++#ifndef __klibc__
+ static int
+ is_a_console(int fd) {
+ char arg;
+@@ -25,6 +26,7 @@ is_a_console(int fd) {
+ && ioctl(fd, KDGKBTYPE, &arg) == 0
+ && ((arg == KB_101) || (arg == KB_84)));
+ }
++#endif
+
+ static int
+ open_a_console(const char *fnam) {
+@@ -41,10 +43,12 @@ open_a_console(const char *fnam) {
+ fd = open(fnam, O_RDONLY);
+ if (fd < 0)
+ return -1;
++ #ifndef __klibc__
+ if (!is_a_console(fd)) {
+ close(fd);
+ return -1;
+ }
++ #endif
+ return fd;
+ }
+
+@@ -80,9 +84,11 @@ int getfd(const char *fnam) {
+ if (fd >= 0)
+ return fd;
+
++ #ifndef __klibc__
+ for (fd = 0; fd < 3; fd++)
+ if (is_a_console(fd))
+ return fd;
++ #endif
+
+ fprintf(stderr,
+ _("Couldnt get a file descriptor referring to the console\n"));
+--
+1.5.3.7
+