about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2009-04-16 23:54:55 +0000
committerMichael Biebl <biebl@debian.org>2009-04-16 23:54:55 +0000
commit8e53ede36fa39a43a4aa5ec7c980e5be877bb2ea (patch)
tree3284742b0e30054082ed5098c07d22d4c1f9aa19
parent606657e54820437d470c39669ff78e44a5532dbf (diff)
* debian/patches/04-struct_termios.patch
  - Fix FTBFS on alpha by using the POSIX.1 struct termios interface instead
    of the obsolete struct termio ioctl interface. (Closes: #524161)

git-svn-id: svn+ssh://svn.debian.org/svn/pkg-utopia/packages/unstable/networkmanager@3081 ceb527fc-18e6-0310-9fe2-813c157c29e7
-rw-r--r--debian/changelog3
-rw-r--r--debian/patches/04-struct_termios.patch66
-rw-r--r--debian/patches/series1
3 files changed, 70 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog
index ebf11001..606713d4 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,9 @@ network-manager (0.7.1-1) UNRELEASED; urgency=low
 
   * New upstream release.
   * Use set -e instead of #!/bin/sh -e for all maintainer scripts.
+  * debian/patches/04-struct_termios.patch
+    - Fix FTBFS on alpha by using the POSIX.1 struct termios interface instead
+      of the obsolete struct termio ioctl interface. (Closes: #524161)
 
  -- Michael Biebl <biebl@debian.org>  Fri, 17 Apr 2009 00:47:03 +0200
 
diff --git a/debian/patches/04-struct_termios.patch b/debian/patches/04-struct_termios.patch
new file mode 100644
index 00000000..9b38e0bf
--- /dev/null
+++ b/debian/patches/04-struct_termios.patch
@@ -0,0 +1,66 @@
+# Fix FTBFS on alpha by using the POSIX.1 struct termios interface instead
+# of the obsolete struct termio ioctl interface. (Closes: #524161)  
+diff --git a/src/nm-serial-device.c b/src/nm-serial-device.c
+index 1cba1ca..afdc6a6 100644
+--- a/src/nm-serial-device.c
++++ b/src/nm-serial-device.c
+@@ -21,13 +21,12 @@
+ 
+ #define _GNU_SOURCE  /* for strcasestr() */
+ 
+-#include <termio.h>
++#include <termios.h>
+ #include <unistd.h>
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <fcntl.h>
+ #include <errno.h>
+-#include <sys/ioctl.h>
+ #include <string.h>
+ #include <stdlib.h>
+ #include <glib.h>
+@@ -346,7 +345,7 @@ static gboolean
+ config_fd (NMSerialDevice *device, NMSettingSerial *setting)
+ {
+ 	NMSerialDevicePrivate *priv = NM_SERIAL_DEVICE_GET_PRIVATE (device);
+-	struct termio stbuf;
++	struct termios stbuf;
+ 	int speed;
+ 	int bits;
+ 	int parity;
+@@ -357,7 +356,7 @@ config_fd (NMSerialDevice *device, NMSettingSerial *setting)
+ 	parity = parse_parity (nm_setting_serial_get_parity (setting));
+ 	stopbits = parse_stopbits (nm_setting_serial_get_stopbits (setting));
+ 
+-	ioctl (priv->fd, TCGETA, &stbuf);
++	tcgetattr (priv->fd, &stbuf);
+ 
+ 	stbuf.c_iflag &= ~(IGNCR | ICRNL | IUCLC | INPCK | IXON | IXANY | IGNPAR );
+ 	stbuf.c_oflag &= ~(OPOST | OLCUC | OCRNL | ONLCR | ONLRET);
+@@ -370,7 +369,7 @@ config_fd (NMSerialDevice *device, NMSettingSerial *setting)
+ 	stbuf.c_cflag &= ~(CBAUD | CSIZE | CSTOPB | CLOCAL | PARENB);
+ 	stbuf.c_cflag |= (speed | bits | CREAD | 0 | parity | stopbits);
+ 
+-	if (ioctl (priv->fd, TCSETA, &stbuf) < 0) {
++	if (tcgetattr (priv->fd, &stbuf) < 0) {
+ 		nm_warning ("(%s) cannot control device (errno %d)",
+ 		            nm_device_get_iface (NM_DEVICE (device)), errno);
+ 		return FALSE;
+@@ -404,7 +403,7 @@ nm_serial_device_open (NMSerialDevice *device,
+ 		return FALSE;
+ 	}
+ 
+-	if (ioctl (priv->fd, TCGETA, &priv->old_t) < 0) {
++	if (tcgetattr (priv->fd, &priv->old_t) < 0) {
+ 		nm_warning ("(%s) cannot control device (errno %d)", iface, errno);
+ 		close (priv->fd);
+ 		return FALSE;
+@@ -447,7 +446,7 @@ nm_serial_device_close (NMSerialDevice *device)
+ 			priv->channel = NULL;
+ 		}
+ 
+-		ioctl (priv->fd, TCSETA, &priv->old_t);
++		tcsetattr (priv->fd, TCSANOW, &priv->old_t);
+ 		close (priv->fd);
+ 		priv->fd = 0;
+ 	}
diff --git a/debian/patches/series b/debian/patches/series
index 3ad97cdd..9f9fb610 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
 02-dbus_access_network_manager.patch
 #03-F3507g.patch
 #20-manual_means_always_online.patch
+04-struct_termios.patch