diff --git a/src/gsconnect-preferences b/src/gsconnect-preferences index f9dad2355..5327686cb 100755 --- a/src/gsconnect-preferences +++ b/src/gsconnect-preferences @@ -11,6 +11,7 @@ imports.gi.versions.Gdk = '3.0'; imports.gi.versions.GdkPixbuf = '2.0'; imports.gi.versions.Gio = '2.0'; +imports.gi.versions.GioUnix = '2.0'; imports.gi.versions.GLib = '2.0'; imports.gi.versions.GObject = '2.0'; imports.gi.versions.Gtk = '3.0'; diff --git a/src/service/backends/lan.js b/src/service/backends/lan.js index a5357bf28..1ac7fbe9e 100644 --- a/src/service/backends/lan.js +++ b/src/service/backends/lan.js @@ -5,6 +5,7 @@ 'use strict'; const Gio = imports.gi.Gio; +const GioUnix = imports.GioUnix; const GLib = imports.gi.GLib; const GObject = imports.gi.GObject; @@ -264,7 +265,7 @@ var ChannelService = GObject.registerClass({ // Input stream this._udp6_stream = new Gio.DataInputStream({ - base_stream: new Gio.UnixInputStream({ + base_stream: new GioUnix.InputStream({ fd: this._udp6.fd, close_fd: false, }), @@ -296,7 +297,7 @@ var ChannelService = GObject.registerClass({ // Input stream this._udp4_stream = new Gio.DataInputStream({ - base_stream: new Gio.UnixInputStream({ + base_stream: new GioUnix.InputStream({ fd: this._udp4.fd, close_fd: false, }), diff --git a/src/service/daemon.js b/src/service/daemon.js index 0d51748d8..27a69e29c 100755 --- a/src/service/daemon.js +++ b/src/service/daemon.js @@ -9,6 +9,7 @@ imports.gi.versions.Gdk = '3.0'; imports.gi.versions.GdkPixbuf = '2.0'; imports.gi.versions.Gio = '2.0'; +imports.gi.versions.GioUnix = '2.0'; imports.gi.versions.GIRepository = '2.0'; imports.gi.versions.GLib = '2.0'; imports.gi.versions.GObject = '2.0'; diff --git a/src/service/nativeMessagingHost.js b/src/service/nativeMessagingHost.js index d83fc7f3f..f06d33e51 100755 --- a/src/service/nativeMessagingHost.js +++ b/src/service/nativeMessagingHost.js @@ -7,10 +7,12 @@ 'use strict'; imports.gi.versions.Gio = '2.0'; +imports.gi.versions.GioUnix = '2.0'; imports.gi.versions.GLib = '2.0'; imports.gi.versions.GObject = '2.0'; const Gio = imports.gi.Gio; +const GioUnix = imports.gi.GioUnix; const GLib = imports.gi.GLib; const GObject = imports.gi.GObject; const System = imports.system; @@ -44,12 +46,12 @@ const NativeMessagingHost = GObject.registerClass({ // IO Channels this._stdin = new Gio.DataInputStream({ - base_stream: new Gio.UnixInputStream({fd: 0}), + base_stream: new GioUnix.InputStream({fd: 0}), byte_order: Gio.DataStreamByteOrder.HOST_ENDIAN, }); this._stdout = new Gio.DataOutputStream({ - base_stream: new Gio.UnixOutputStream({fd: 1}), + base_stream: new GioUnix.OutputStream({fd: 1}), byte_order: Gio.DataStreamByteOrder.HOST_ENDIAN, });