From f40f680bcc57c6f2c16533dc16b34302f85eea6c Mon Sep 17 00:00:00 2001 From: GZharun Date: Tue, 25 Nov 2014 18:11:13 +0200 Subject: [PATCH] [Summary] Fixed MAC build --- libs/pbd/crossthread.cc | 6 ++---- libs/pbd/pbd/crossthread.h | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/libs/pbd/crossthread.cc b/libs/pbd/crossthread.cc index d9fbcc76cd..7b0ab9fb32 100644 --- a/libs/pbd/crossthread.cc +++ b/libs/pbd/crossthread.cc @@ -34,7 +34,6 @@ using namespace Glib; CrossThreadChannel::CrossThreadChannel (bool non_blocking) { - _ios = 0; fds[0] = -1; fds[1] = -1; @@ -83,7 +82,7 @@ RefPtr CrossThreadChannel::ios () { if (!_ios) { - _ios.reset (IOSource::create (fds[0], IOCondition(IO_IN|IO_PRI|IO_ERR|IO_HUP|IO_NVAL))); + _ios = IOSource::create (fds[0], IOCondition(IO_IN|IO_PRI|IO_ERR|IO_HUP|IO_NVAL)); } return _ios; } @@ -97,9 +96,8 @@ CrossThreadChannel::drop_ios () void CrossThreadChannel::drain () { - /* drain selectable fd */ char buf[64]; - while (::read (fd, buf, sizeof (buf)) > 0) {}; + while (::read (fds[0], buf, sizeof (buf)) > 0) {}; } int diff --git a/libs/pbd/pbd/crossthread.h b/libs/pbd/pbd/crossthread.h index ece28b840a..1870f9bfe4 100644 --- a/libs/pbd/pbd/crossthread.h +++ b/libs/pbd/pbd/crossthread.h @@ -88,8 +88,8 @@ class LIBPBD_API CrossThreadChannel { */ Glib::RefPtr ios(); + void drop_ios (); private: - void drop_ios (); Glib::RefPtr _ios; // lazily constructed #ifndef PLATFORM_WINDOWS