Package: opensp
Version: 1.5.1.0-4
Severity: important
Tags: patch

Hi,

your package failed to autobuild on hurd-i386:

Automatic build of opensp_1.5.1.0-4 on beethoven by sbuild/hurd-i386 79
Build started at 20051218-2231
******************************************************************************
[...]
if g++ -DHAVE_CONFIG_H -I. -I. -I.. -I../include    -g --pipe -O2 -MT 
XmlOutputEventHandler.o -MD -MP -MF ".deps/XmlOutputEventHandler.Tpo" \
  -c -o XmlOutputEventHandler.o `test -f 'XmlOutputEventHandler.cxx' || echo 
'./'`XmlOutputEventHandler.cxx; \
then mv -f ".deps/XmlOutputEventHandler.Tpo" ".deps/XmlOutputEventHandler.Po"; \
else rm -f ".deps/XmlOutputEventHandler.Tpo"; exit 1; \
fi
XmlOutputEventHandler.cxx: In member function 'virtual void 
OpenSP::XmlOutputEventHandler::inputOpened(OpenSP::InputSource*)':
XmlOutputEventHandler.cxx:1192: error: 'MAXPATHLEN' was not declared in this 
scope
XmlOutputEventHandler.cxx:1193: error: size of array 'realOutputDir' has 
non-integral type '<type error>'
XmlOutputEventHandler.cxx:1196: error: 'realDirs' was not declared in this scope
[...]
make[4]: *** [XmlOutputEventHandler.o] Error 1
make[4]: Leaving directory `/build/buildd/opensp-1.5.1.0/sx'
make[3]: *** [all] Error 2
make[3]: Leaving directory `/build/buildd/opensp-1.5.1.0/sx'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/build/buildd/opensp-1.5.1.0'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/build/buildd/opensp-1.5.1.0'
make: *** [build-stamp] Error 2
******************************************************************************
Build finished at 20051218-2253
FAILED [dpkg-buildpackage died]

MAXPATHLEN does not exist on the GNU system, as there is no limit for
path lenghts.

The attached patch fixes this in a crude way which is appropriate to
make it build for Debian GNU/Hurd, but which should not go upstream
probably.  The right fix is to avoid allocating a static array here,
either by knowing the length of the pathname beforehand, or by
dynamically allocating the necessary memory.


Michael
--- opensp-1.5.1.0/sx/XmlOutputEventHandler.cxx.orig    2005-12-25 
02:56:22.000000000 +0100
+++ opensp-1.5.1.0/sx/XmlOutputEventHandler.cxx 2005-12-25 02:57:03.000000000 
+0100
@@ -29,6 +29,10 @@
 #include <unistd.h>
 #include <stdio.h>
 
+#ifndef MAXPATHLEN
+#define MAXPATHLEN 4096
+#endif
+
 #ifdef SP_NAMESPACE
 namespace SP_NAMESPACE {
 #endif

Reply via email to