[moserial] Fix build with vala 0.14, but maintain 0.12 compatibility, bug 671223
- From: Michael J. Chudobiak <mjc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [moserial] Fix build with vala 0.14, but maintain 0.12 compatibility, bug 671223
- Date: Fri, 2 Mar 2012 19:15:28 +0000 (UTC)
commit 084d920e3f47eca961d2fb6df07a67d257376205
Author: Michael J. Chudobiak <mjc avtechpulse com>
Date: Fri Mar 2 14:14:13 2012 -0500
Fix build with vala 0.14, but maintain 0.12 compatibility, bug 671223
src/SerialConnection.vala | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/src/SerialConnection.vala b/src/SerialConnection.vala
index 516292c..5a85036 100644
--- a/src/SerialConnection.vala
+++ b/src/SerialConnection.vala
@@ -70,7 +70,12 @@ public class moserial.SerialConnection : GLib.Object
Posix.tcflush(m_fd, Posix.TCIOFLUSH);
// int n = Posix.File.fcntl(m_fd, Posix.File.FDFlag.GETFL);
// Posix.File.fcntl_with_arg(m_fd, Posix.File.FDFlag.SETFL, n & ~Posix.File.FileStatus.NDELAY);
+
+#if VALA_0_14
+ tcgetattr(m_fd, out restoretio);
+#else
tcgetattr(m_fd, restoretio);
+#endif
applySettings(settings);
tcsetattr(m_fd, Posix.TCSANOW, newtio);
@@ -203,8 +208,13 @@ public class moserial.SerialConnection : GLib.Object
break;
}
+#if VALA_0_14
+ Posix.cfsetospeed(ref newtio, baudRate);
+ Posix.cfsetispeed(ref newtio, baudRate);
+#else
Posix.cfsetospeed(newtio, baudRate);
Posix.cfsetispeed(newtio, baudRate);
+#endif
//DataBits
int dataBits;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]