summaryrefslogtreecommitdiff
path: root/archivers/torrentzip/patches
diff options
context:
space:
mode:
authorjperkin <jperkin>2014-01-09 15:40:55 +0000
committerjperkin <jperkin>2014-01-09 15:40:55 +0000
commita7e30555a8669f432c547cce28a2c06715767cd5 (patch)
tree8d644ccacfa343efa43cb3e4718827c5cde31b52 /archivers/torrentzip/patches
parent10d59ba81232c35869b014d384dcfc2382c9d8ae (diff)
downloadpkgsrc-a7e30555a8669f432c547cce28a2c06715767cd5.tar.gz
Add cfmakeraw compatability for SunOS.
Diffstat (limited to 'archivers/torrentzip/patches')
-rw-r--r--archivers/torrentzip/patches/patch-src_platform.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/archivers/torrentzip/patches/patch-src_platform.c b/archivers/torrentzip/patches/patch-src_platform.c
new file mode 100644
index 00000000000..3fd417c6d19
--- /dev/null
+++ b/archivers/torrentzip/patches/patch-src_platform.c
@@ -0,0 +1,22 @@
+$NetBSD: patch-src_platform.c,v 1.1 2014/01/09 15:40:55 jperkin Exp $
+
+cfmakeraw compatability for SunOS.
+
+--- src/platform.c.orig 2005-04-17 08:36:15.000000000 +0000
++++ src/platform.c
+@@ -45,7 +45,15 @@ getch (void)
+
+ tcgetattr (1, &t);
+ t2 = t;
++#ifdef __sun
++ t2.c_iflag &= ~(IMAXBEL|IGNBRK|BRKINT|PARMRK|ISTRIP|INLCR|IGNCR|ICRNL|IXON);
++ t2.c_oflag &= ~OPOST;
++ t2.c_lflag &= ~(ECHO|ECHONL|ICANON|ISIG|IEXTEN);
++ t2.c_cflag &= ~(CSIZE|PARENB);
++ t2.c_cflag |= CS8;
++#else
+ cfmakeraw (&t2);
++#endif
+ tcsetattr (1, TCSANOW, &t2);
+ fread (&c, 1, 1, stdin);
+ tcsetattr (1, TCSANOW, &t);