File: debian-patches

package info (click to toggle)
fml 4.0.3.dfsg-2
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 2,528 kB
  • ctags: 5
  • sloc: perl: 711; sh: 95; makefile: 88
file content (35 lines) | stat: -rw-r--r-- 910 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
--- fml-4.0.2.20011022.orig/bin/daemon.pl
+++ fml-4.0.2.20011022/bin/daemon.pl
@@ -1,4 +1,4 @@
-#!/usr/local/bin/perl
+#!/usr/bin/perl
 #
 # Copyright (C) 1993-1998 Ken'ichi Fukamachi
 #          All rights reserved. 
@@ -30,6 +30,26 @@
 	open(TTY, "+> /dev/tty")   || die("$!\n");
 	ioctl(TTY, &TIOCNOTTY, "") || die("$!\n");
 	close(TTY);
+    } else { # XXX - quick hacks by ukai
+	local($ioctlh);
+      IOCTLSEARCH:
+	foreach $ioctlh ('/usr/include/asm/ioctls.h',
+			 '/usr/include/ioctls.h',
+			 '/usr/include/sys/ioctl.h') {
+	    if (-f $ioctlh && open(IH, "$ioctlh")) {
+		while (<IH>) {
+		    if (/TIOCNOTTY\s+(0x[0-9a-fA-F]+)/) {
+			eval("sub TIOCNOTTY { return $1 };");
+			last IOCTLSEARCH;
+		    }
+		}
+	    }
+	}
+	if (defined &TIOCNOTTY) {
+	    open(TTY, "+> /dev/tty")   || die("$!\n");
+	    ioctl(TTY, &TIOCNOTTY, "") || die("$!\n");
+	    close(TTY);
+	}
     }
 
     close(STDIN);