diff -pruN 1.17-4/ChangeLog 1.19-0ubuntu8/ChangeLog
--- 1.17-4/ChangeLog	2010-05-29 16:57:40.000000000 +0000
+++ 1.19-0ubuntu8/ChangeLog	2013-02-23 22:18:44.000000000 +0000
@@ -1,5 +1,14 @@
+2012-01-26  Kasper Peeters  <kasper.peeters@aei.mpg.de>
+
+	* Released 1.18
+
+	* Changed read_nonblocking_ in pipe.cc to circumvent a Mac OSX
+	compiler bug.
+
 2010-05-29  Kasper Peeters  <kasper.peeters@aei.mpg.de>
 
+	* Released 1.17
+
 	* Removed RPATH from prompt.
 
 2010-03-03  Kasper Peeters  <kasper.peeters@aei.mpg.de>
diff -pruN 1.17-4/debian/changelog 1.19-0ubuntu8/debian/changelog
--- 1.17-4/debian/changelog	2020-05-12 13:22:02.000000000 +0000
+++ 1.19-0ubuntu8/debian/changelog	2020-05-26 02:51:58.000000000 +0000
@@ -1,47 +1,54 @@
-modglue (1.17-4) unstable; urgency=medium
+modglue (1.19-0ubuntu8) groovy; urgency=medium
 
-  * QA upload.
-  * Comment out unused struct violating flexible array member constraints,
-    fixing FTBFS with modern compilers.  (Closes: #954602)
+  * Import patch from Debian to fix FTBFS due to unused struct violating
+    flexible array constraints.
 
- -- Andreas Beckmann <anbe@debian.org>  Tue, 12 May 2020 15:22:02 +0200
+ -- Logan Rosen <logan@ubuntu.com>  Mon, 25 May 2020 22:51:58 -0400
 
-modglue (1.17-3) unstable; urgency=medium
+modglue (1.19-0ubuntu7) focal; urgency=medium
 
-  * QA upload.
-  * Set Maintainer to Debian QA Group.  (See: #834847)
-  * Acknowledge NMU.  (Closes: #815337)
-  * Update watch file.  (Closes: #731571)
-  * Make the build reproducible, thanks to Reiner Herrmann.  (Closes: #829762)
-  * Switch to debhelper compat level 10 and minimal dh rules.
-  * Update debian/copyright to copyright-format 1.0.
-  * Bump Standards-Version to 3.9.8, no changes needed.
+  * No-change rebuild for libgcc-s1 package name change.
 
- -- Andreas Beckmann <anbe@debian.org>  Tue, 10 Jan 2017 19:30:13 +0100
+ -- Matthias Klose <doko@ubuntu.com>  Sun, 22 Mar 2020 16:50:03 +0100
 
-modglue (1.17-2.4) unstable; urgency=medium
+modglue (1.19-0ubuntu6) eoan; urgency=medium
 
-  * Non-maintainer upload.
-  * libmodglue1v5: Add Breaks+Replaces: libmodglue1.  (Closes: #796864)
-  * Drop obsolete DMUA flag.
+  * No-change upload with strops.h and sys/strops.h removed in glibc.
 
- -- Andreas Beckmann <anbe@debian.org>  Sat, 12 Sep 2015 23:27:37 +0200
+ -- Matthias Klose <doko@ubuntu.com>  Thu, 05 Sep 2019 11:02:12 +0000
 
-modglue (1.17-2.3) unstable; urgency=medium
+modglue (1.19-0ubuntu5) bionic; urgency=medium
 
-  * Non-maintainer upload.
-  * Rename library packages for g++ 5 transition (see #791204)
-  * Make libmodglue1-dev arch:any so that it can have a tight
-    dependency on the library package, and add that dependency
+  * Fix FTBFS by adding build-arch and build-indep targets to debian/rules
 
- -- Jonathan Wiltshire <jmw@debian.org>  Fri, 14 Aug 2015 18:27:41 +0100
+ -- Balint Reczey <rbalint@ubuntu.com>  Wed, 25 Apr 2018 20:43:28 +0200
 
-modglue (1.17-2.2) unstable; urgency=medium
+modglue (1.19-0ubuntu4) bionic; urgency=high
 
-  * Non-maintainer upload.
-  * Build-depend on libtool-bin. Closes: #761777.
+  * No change rebuild to pick up -fPIE compiler default
+
+ -- Balint Reczey <rbalint@ubuntu.com>  Tue, 03 Apr 2018 12:35:09 +0000
+
+modglue (1.19-0ubuntu3) wily; urgency=medium
+
+  * Merge change from Debian
+    + Build-Depend on libtool-bin to fix FTBFS.
+
+ -- Iain Lane <iain@orangesquash.org.uk>  Tue, 04 Aug 2015 17:49:08 +0100
+
+modglue (1.19-0ubuntu2) wily; urgency=medium
+
+  * Rename library packages for g++5 ABI transition.
+
+ -- Iain Lane <iain@orangesquash.org.uk>  Tue, 04 Aug 2015 11:30:25 +0100
+
+modglue (1.19-0ubuntu1) trusty; urgency=low
+
+  * New upstream release.
+  * Update debian/watch.
+  * Refresh patch.
 
- -- Matthias Klose <doko@debian.org>  Thu, 09 Oct 2014 09:57:58 +0000
+ -- Logan Rosen <logan@ubuntu.com>  Fri, 06 Dec 2013 15:51:38 -0500
 
 modglue (1.17-2.1) unstable; urgency=low
 
@@ -68,7 +75,7 @@ modglue (1.17-1) unstable; urgency=low
     + Fix 'incorrect-libdir-in-la-file usr/lib/libmodglue.la /usr//lib !=
     /usr/lib' lintian error.
   * Add chrpath to Build-Depends.
-  * Add ${binary:Version} to fix 'weak-library-dev-dependency' lintian
+  * Add ${binary:Version} to fix 'weak-library-dev-dependency' lintian 
     error.
 
  -- Iulian Udrea <iulian@ubuntu.com>  Fri, 28 May 2010 19:32:22 +0100
diff -pruN 1.17-4/debian/compat 1.19-0ubuntu8/debian/compat
--- 1.17-4/debian/compat	2017-01-10 18:33:22.000000000 +0000
+++ 1.19-0ubuntu8/debian/compat	2013-12-06 20:50:38.000000000 +0000
@@ -1 +1 @@
-10
+7
diff -pruN 1.17-4/debian/control 1.19-0ubuntu8/debian/control
--- 1.17-4/debian/control	2017-01-10 18:07:37.000000000 +0000
+++ 1.19-0ubuntu8/debian/control	2015-08-04 16:48:57.000000000 +0000
@@ -1,21 +1,17 @@
 Source: modglue
 Section: libs
 Priority: optional
-Maintainer: Debian QA Group <packages@qa.debian.org>
+Maintainer: Iulian Udrea <iulian@ubuntu.com>
+Uploaders: Kasper Peeters <kasper.peeters@aei.mpg.de>
+DM-Upload-Allowed: yes
 Homepage: http://www.aei.mpg.de/~peekas/modglue/
-Build-Depends:
- debhelper (>= 10),
- pkg-config,
- libsigc++-2.0-dev,
- libtool,
- libtool-bin,
- chrpath,
-Standards-Version: 3.9.8
+Build-Depends: debhelper (>= 7.0.50), pkg-config, libsigc++-2.0-dev, libtool-bin, chrpath
+Standards-Version: 3.8.4
 
 Package: libmodglue1-dev
 Section: libdevel
-Architecture: any
-Depends: libmodglue1v5 (= ${binary:Version}), ${misc:Depends}
+Architecture: all
+Depends: libmodglue1v5 (>= ${binary:Version}), ${misc:Depends}
 Description: development files for a C++ library for handling of multiple co-processes
  Modglue is a C++ library with classes for forking external
  processes and asynchronous reading from streams. It takes
@@ -29,7 +25,7 @@ Description: development files for a C++
 Package: libmodglue1v5
 Architecture: any
 Depends: ${shlibs:Depends}, ${misc:Depends}
-Breaks: libmodglue1
+Conflicts: libmodglue1
 Replaces: libmodglue1
 Description: C++ library for handling of multiple co-processes
  Modglue is a C++ library with classes for forking external
diff -pruN 1.17-4/debian/copyright 1.19-0ubuntu8/debian/copyright
--- 1.17-4/debian/copyright	2017-01-10 18:33:54.000000000 +0000
+++ 1.19-0ubuntu8/debian/copyright	2013-12-06 20:50:38.000000000 +0000
@@ -1,43 +1,43 @@
-Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
-Upstream-Name: modglue
-Upstream-Contact: Kasper Peeters <kasper.peeters@aei.mpg.de>
+Format-Specification: http://svn.debian.org/wsvn/dep/web/deps/dep5.mdwn?   op=file&rev=59
+Name: modglue
+Maintainer: Kasper Peeters <kasper.peeters@aei.mpg.de>
 Source: http://www.aei.mpg.de/~peekas/modglue/
-
+ 
 Files: *
 Copyright: Copyright (C) 2000-2009 by Kasper Peeters <kasper.peeters@aei.mpg.de>
-License: GPL-2.0
- This package is free software; you can redistribute it and/or modify
+License: GPL-2
+
+ This program is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation; version 2.
- .
- This package is distributed in the hope that it will be useful,
+ 
+ This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.
- .
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <https://www.gnu.org/licenses/>
- .
- On Debian systems, the complete text of the GNU General
- Public License version 2 can be found in "/usr/share/common-licenses/GPL-2".
-
+ 
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ 
+On Debian systems, the complete text of the GNU General
+Public License version 2 can be found in `/usr/share/common-licenses/GPL-2'.
+ 
 Files: debian/*
 Copyright: (C) 2006, Kasper Peeters <kasper.peeters@aei.mpg.de>
            (C) 2009, Gürkan Sengün <gurkan@phys.ethz.ch>
            (C) 2010, Iulian Udrea <iulian@ubuntu.com>
-License: GPL-3.0+
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
- .
- This package is distributed in the hope that it will be useful,
+License: GPL-3
+
+ This program is free software: you can redistribute it and/or
+ modify it under the terms of the GNU General Public License as
+ published by the Free Software Foundation, either version 3 of the
+ License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- GNU General Public License for more details.
- .
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ General Public License for more details.
+
  You should have received a copy of the GNU General Public License
- along with this program. If not, see <https://www.gnu.org/licenses/>.
- .
- On Debian systems, the complete text of the GNU General
- Public License version 3 can be found in "/usr/share/common-licenses/GPL-3".
+ along with this program.  If not, see <http://www.gnu.org/licenses/>.
diff -pruN 1.17-4/debian/libmodglue1-dev.examples 1.19-0ubuntu8/debian/libmodglue1-dev.examples
--- 1.17-4/debian/libmodglue1-dev.examples	2017-01-10 18:34:12.000000000 +0000
+++ 1.19-0ubuntu8/debian/libmodglue1-dev.examples	2013-12-06 20:50:38.000000000 +0000
@@ -1 +1,2 @@
 examples/*
+
diff -pruN 1.17-4/debian/libmodglue1v5.lintian-overrides 1.19-0ubuntu8/debian/libmodglue1v5.lintian-overrides
--- 1.17-4/debian/libmodglue1v5.lintian-overrides	1970-01-01 00:00:00.000000000 +0000
+++ 1.19-0ubuntu8/debian/libmodglue1v5.lintian-overrides	2015-08-04 10:30:25.000000000 +0000
@@ -0,0 +1,2 @@
+# G++5 ABI transition
+libmodglue1v5: package-name-doesnt-match-sonames libmodglue1
diff -pruN 1.17-4/debian/patches/01_fix_libs_in_linking_tests 1.19-0ubuntu8/debian/patches/01_fix_libs_in_linking_tests
--- 1.17-4/debian/patches/01_fix_libs_in_linking_tests	2011-06-26 07:56:40.000000000 +0000
+++ 1.19-0ubuntu8/debian/patches/01_fix_libs_in_linking_tests	2013-12-06 20:53:59.000000000 +0000
@@ -3,13 +3,11 @@ Description: Fixes Makefile template to
 .
 Forwarded: not-needed
 Author: Sebastian Carneiro <scarneiro@speedy.com.ar>
-Last-Update: 2011-06-12
+Last-Update: 2013-12-06
 
-Index: modglue-1.17/src/Makefile.in
-===================================================================
---- modglue-1.17.orig/src/Makefile.in	2011-06-12 14:00:09.667589422 -0300
-+++ modglue-1.17/src/Makefile.in	2011-06-12 14:52:05.395039551 -0300
-@@ -54,13 +54,13 @@
+--- a/src/Makefile.in
++++ b/src/Makefile.in
+@@ -60,13 +60,13 @@
  	${MPHASE} -o test_child_process $< libmodglue.la
  
  test_ext_process: test_ext_process.o
diff -pruN 1.17-4/debian/patches/02_reproducible_build.patch 1.19-0ubuntu8/debian/patches/02_reproducible_build.patch
--- 1.17-4/debian/patches/02_reproducible_build.patch	2017-01-10 18:02:06.000000000 +0000
+++ 1.19-0ubuntu8/debian/patches/02_reproducible_build.patch	1970-01-01 00:00:00.000000000 +0000
@@ -1,32 +0,0 @@
-Author: Reiner Herrmann <reiner@reiner-h.de>
-Description: Strip build date and hostname to enable reproducible building
-
---- a/src/Makefile.in
-+++ b/src/Makefile.in
-@@ -21,8 +21,6 @@
- IPHASE = ${LIBTOOL} --mode=install @INSTALL@
- FPHASE = ${LIBTOOL} --mode=finish @prefix@/@libdir@
- 
--TIMESTAMP = -D"DATETIME=\"`date | sed -e 's/  / /'`\"" -DHOSTNAME=\"`hostname`\"
--
- all: library tests tools
- 
- TOOLS  = ptywrap isatty prompt
---- a/src/prompt.cc
-+++ b/src/prompt.cc
-@@ -392,12 +392,11 @@
- int main(int argc, char **argv)
- 	{
- 	if(argc==1) {
--		cerr << "prompt (";
-+		cerr << "prompt";
- #ifdef STATICBUILD
--		cerr << "static, ";
-+		cerr << " (static)";
- #endif
--		cerr << "built on " << DATETIME << /* " on " << HOSTNAME << */ ")" << std::endl
--			  << "Copyright (C) 2001-2006  Kasper Peeters <kasper.peeters@aei.mpg.de>" << endl << endl
-+		cerr  << "Copyright (C) 2001-2006  Kasper Peeters <kasper.peeters@aei.mpg.de>" << endl << endl
- 			  << "Usage: prompt [program] [args]" << endl;
- 		exit(-1);
- 		}
diff -pruN 1.17-4/debian/patches/series 1.19-0ubuntu8/debian/patches/series
--- 1.17-4/debian/patches/series	2020-05-12 13:20:46.000000000 +0000
+++ 1.19-0ubuntu8/debian/patches/series	2020-05-26 02:51:52.000000000 +0000
@@ -1,3 +1,2 @@
 01_fix_libs_in_linking_tests
-02_reproducible_build.patch
 flexible-array-member.patch
diff -pruN 1.17-4/debian/rules 1.19-0ubuntu8/debian/rules
--- 1.17-4/debian/rules	2017-01-10 18:15:57.000000000 +0000
+++ 1.19-0ubuntu8/debian/rules	2018-04-25 18:43:28.000000000 +0000
@@ -1,12 +1,91 @@
 #!/usr/bin/make -f
 # -*- makefile -*-
 
-%:
-	dh $@ --no-parallel
+# These are used for cross-compiling and for saving the configure script
+# from having to guess our platform (since we know it already)
+DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
+DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
 
-# don't autoreconf
-override_dh_autoreconf:
+CFLAGS = -Wall -g
 
-override_dh_auto_install:
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+	CFLAGS += -O0
+else
+	CFLAGS += -O2
+endif
+
+# option 2, assuming the library is created as src/.libs/libfoo.so.2.0.5 or so
+version=`ls src/.libs/lib*.so.* | \
+ awk '{if (match($$0,/[0-9]+\.[0-9]+\.[0-9]+$$/)) print substr($$0,RSTART)}'`
+major=`ls src/.libs/lib*.so.* | \
+ awk '{if (match($$0,/\.so\.[0-9]+$$/)) print substr($$0,RSTART+4)}'`
+
+config.status: configure
+	dh_testdir
+	CFLAGS="$(CFLAGS) -Wl,-z,defs" ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info
+
+build: build-arch build-indep
+build-arch: build-stamp
+build-indep: build-stamp
+build-stamp: config.status
+	dh_testdir
+	$(MAKE)
+	touch build-stamp
+
+configure:
+	ifneq "$(wildcard /usr/share/misc/config.sub)" ""
+		cp -f /usr/share/misc/config.sub config.sub
+	endif
+	ifneq "$(wildcard /usr/share/misc/config.guess)" ""
+		cp -f /usr/share/misc/config.guess config.guess
+	endif
+
+clean:
+	dh_testdir
+	dh_testroot
+	rm -f build-stamp
+	[ ! -f Makefile ] || $(MAKE) distclean
+	rm -f config.guess config.sub
+	dh_clean
+
+install: build
+	dh_testdir
+	dh_testroot
+	dh_prep
+	dh_installdirs
 	$(MAKE) install DESTDIR=$(CURDIR)/debian/libmodglue1v5 DEVDESTDIR=$(CURDIR)/debian/libmodglue1-dev
 	rm `find $(CURDIR)/debian -name '*.la'`
+
+# Build architecture-independent files here.
+binary-indep: build install
+	dh_testdir -i
+	dh_testroot -i
+	dh_installchangelogs -i ChangeLog
+	dh_installdocs -i debian/copyright
+	dh_installexamples -i
+	dh_compress -i
+	dh_fixperms -i
+	dh_installdeb -i
+	dh_gencontrol -i
+	dh_md5sums -i
+	dh_builddeb -i
+
+# Build architecture-dependent files here.
+binary-arch: build install
+	dh_testdir -a
+	dh_testroot -a
+	dh_installchangelogs -a ChangeLog
+	dh_installdocs -a
+	dh_installman -a
+	dh_strip -a
+	dh_compress -a
+	dh_fixperms -a
+	dh_makeshlibs -a
+	dh_installdeb -a
+	dh_shlibdeps -a
+	dh_gencontrol -a
+	dh_md5sums -a
+	dh_builddeb -a
+
+binary: binary-indep binary-arch
+.PHONY: build build-arch build-indep clean binary-indep binary-arch binary install
diff -pruN 1.17-4/.gitignore 1.19-0ubuntu8/.gitignore
--- 1.17-4/.gitignore	2010-05-29 16:57:40.000000000 +0000
+++ 1.19-0ubuntu8/.gitignore	2013-02-23 22:18:44.000000000 +0000
@@ -16,6 +16,7 @@ src/isatty
 src/test_child_process
 src/test_ext_process
 src/test_writes
+src/test_writes.out
 src/test_pipe
 *.la
 src/.libs
diff -pruN 1.17-4/include/modglue/mid.hh 1.19-0ubuntu8/include/modglue/mid.hh
--- 1.17-4/include/modglue/mid.hh	2010-05-29 16:57:40.000000000 +0000
+++ 1.19-0ubuntu8/include/modglue/mid.hh	2013-02-23 22:18:44.000000000 +0000
@@ -24,6 +24,8 @@
 
 #include <string>
 #include <iostream>
+#include <sys/types.h>
+
 //#include <proj++/thread.hh>
 //#include <proj++/thread_mutex.hh>
 
diff -pruN 1.17-4/Makefile.in 1.19-0ubuntu8/Makefile.in
--- 1.17-4/Makefile.in	2010-05-29 16:57:40.000000000 +0000
+++ 1.19-0ubuntu8/Makefile.in	2013-02-23 22:18:44.000000000 +0000
@@ -1,5 +1,5 @@
 
-export RELEASE=1.17
+export RELEASE=1.19
 
 .PHONY: all install library static examples uninstall clean distclean
 
@@ -7,6 +7,7 @@ all: library
 #examples
 
 library:
+	echo @libdir@
 	( cd src && $(MAKE) );
 
 static:
diff -pruN 1.17-4/src/main.cc 1.19-0ubuntu8/src/main.cc
--- 1.17-4/src/main.cc	2010-05-29 16:57:40.000000000 +0000
+++ 1.19-0ubuntu8/src/main.cc	2013-02-23 22:18:44.000000000 +0000
@@ -293,7 +293,7 @@ bool main::select_callback(int fd)
 				pid_t childpid=0;
 				int   exit_code=0;
 //				std::cerr << buffer << std::endl;
-				sscanf(buffer, "%ld %d", &childpid, &exit_code);
+				sscanf(buffer, "%ld %d", (long *)&childpid, &exit_code);
 				// This often gets reached after cerr has gone away. Why?
 				for(unsigned int i=0; i<processes_.size(); ++i) {
 //					std::cerr << processes_[i]->get_pid() << std::endl;
diff -pruN 1.17-4/src/Makefile.in 1.19-0ubuntu8/src/Makefile.in
--- 1.17-4/src/Makefile.in	2010-05-29 16:57:40.000000000 +0000
+++ 1.19-0ubuntu8/src/Makefile.in	2013-02-23 22:18:44.000000000 +0000
@@ -5,9 +5,15 @@ MACTEST= @MAC_OS_X@
 ifeq ($(strip $(MACTEST)),)
 LIBTOOL = libtool
 else
-export MACOSX_DEPLOYMENT_TARGET=10.3
+#export MACOSX_DEPLOYMENT_TARGET=10.3
 LIBTOOL = glibtool
 endif
+# Ubuntu/Debian sometimes use DEVDESTDIR, but if it is
+# absent, just set it equal to DESTDIR otherwise macs will
+# get confused.
+ifndef DEVDESTDIR
+DEVDESTDIR=${DESTDIR}
+endif
 
 # We use libtool but without any of the automake 
 # nonsense, so we only need the following 5 lines.
@@ -66,7 +72,7 @@ test_writes: test_writes.o
 
 prompt: prompt.o
 	${MPHASE} -o prompt prompt.o `pkg-config sigc++-2.0 --libs` libmodglue.la 
-	chrpath -d .libs/prompt
+#	chrpath -d .libs/prompt
 
 prompt_static: prompt.cc library
 	${CPHASE} ${TIMESTAMP} -o prompt.o \
@@ -99,6 +105,9 @@ isatty: isatty.o
 #------- Library --------------------------------------
 
 install: library tools
+ifeq ($(strip ${DEVDESTDIR}),)
+	DEVDESTDIR=${DESTDIR}
+endif
 	@INSTALL@ -m 755 -d ${DESTDIR}@prefix@
 	@INSTALL@ -m 755 -d ${DESTDIR}@prefix@/@libdir@
 	@INSTALL@ -m 755 -d ${DEVDESTDIR}@prefix@/@libdir@
diff -pruN 1.17-4/src/pipe.cc 1.19-0ubuntu8/src/pipe.cc
--- 1.17-4/src/pipe.cc	2010-05-29 16:57:40.000000000 +0000
+++ 1.19-0ubuntu8/src/pipe.cc	2013-02-23 22:18:44.000000000 +0000
@@ -184,7 +184,8 @@ int modglue::pipe::read_nonblocking_(cha
 		}
 	else {
 		// CHECKED: recmsg is not the reason for dropped bytes
-		char cbuf[CMSG_SPACE(sizeof(int))]; 
+		int len=CMSG_SPACE(sizeof(int));
+		char *cbuf = new char[len];
 		struct msghdr mh = {0};
 		struct iovec iov; 
 		
@@ -193,13 +194,16 @@ int modglue::pipe::read_nonblocking_(cha
 		iov.iov_base = data; 
 		iov.iov_len = maxlen;
 		mh.msg_control = cbuf;
-		mh.msg_controllen = sizeof cbuf; 
+		mh.msg_controllen = len;
 		
 		int ret;
 		do {
 			ret = recvmsg(fd_, &mh, 0);
 			} while(ret<0 && errno==EINTR);
 		assert(!(ret<0 && errno!=EAGAIN));
+		
+		delete [] cbuf;
+
 		return ret;
 		}
 	}
