summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabian Groffen <grobian@gentoo.org>2016-07-31 19:24:07 +0200
committerFabian Groffen <grobian@gentoo.org>2016-07-31 19:24:07 +0200
commit1490e73dda15c34b881ace1568214bd4d1fd2b08 (patch)
tree70250ba7654c1286024734963ffc99f185900cd5 /sys-apps/setserial
parentapp-text/zathura: bump to 0.3.6 (diff)
downloadgentoo-1490e73dda15c34b881ace1568214bd4d1fd2b08.tar.gz
gentoo-1490e73dda15c34b881ace1568214bd4d1fd2b08.tar.bz2
gentoo-1490e73dda15c34b881ace1568214bd4d1fd2b08.zip
sys-apps/setserial: add patch for Darwin, bug #541536
Package-Manager: portage-2.2.28
Diffstat (limited to 'sys-apps/setserial')
-rw-r--r--sys-apps/setserial/files/setserial-2.17-darwin.patch33
-rw-r--r--sys-apps/setserial/setserial-2.17-r4.ebuild1
2 files changed, 34 insertions, 0 deletions
diff --git a/sys-apps/setserial/files/setserial-2.17-darwin.patch b/sys-apps/setserial/files/setserial-2.17-darwin.patch
new file mode 100644
index 000000000000..681f793383cd
--- /dev/null
+++ b/sys-apps/setserial/files/setserial-2.17-darwin.patch
@@ -0,0 +1,33 @@
+https://541536.bugs.gentoo.org/attachment.cgi?id=397618
+https://bugs.gentoo.org/show_bug.cgi?id=541536
+
+diff --git a/setserial.c b/setserial.c
+index 3474402..3ce8009 100644
+--- a/setserial.c
++++ b/setserial.c
+@@ -31,6 +31,25 @@
+
+ #include "version.h"
+
++#ifdef __APPLE__
++// see http://www.insanelymac.com/forum/topic/155999-compiling-setserial-on-mac-os-x/
++#ifndef TIOCGSERIAL
++#define TIOCGSERIAL 0x541E
++#endif
++#ifndef TIOCSERCONFIG
++#define TIOCSERCONFIG 0x5453
++#endif
++#ifndef TIOCSSERIAL
++#define TIOCSSERIAL 0x541F
++#endif
++#ifndef TIOCSERGWILD
++#define TIOCSERGWILD 0x5454
++#endif
++#ifndef TIOCSERSWILD
++#define TIOCSERSWILD 0x5455
++#endif
++#endif
++
+ static char version_str[] = "setserial version " SETSERIAL_VERSION ", "
+ SETSERIAL_DATE;
+
diff --git a/sys-apps/setserial/setserial-2.17-r4.ebuild b/sys-apps/setserial/setserial-2.17-r4.ebuild
index e15f4fb1483f..950bd573e0f3 100644
--- a/sys-apps/setserial/setserial-2.17-r4.ebuild
+++ b/sys-apps/setserial/setserial-2.17-r4.ebuild
@@ -22,6 +22,7 @@ src_unpack() {
epatch "${FILESDIR}"/${P}-headers.patch
epatch "${FILESDIR}"/${P}-build.patch
epatch "${FILESDIR}"/${P}-hayes-esp.patch #309883
+ epatch "${FILESDIR}"/${P}-darwin.patch #541536
}
src_compile() {