Package: dbus-c++
Version: 0~20090718-2
Severity: important
Tags: patch
User: debian-...@lists.debian.org
Usertags: kfreebsd

Hi,

your package currently FTBFS on GNU/kFreeBSD because of a missing
HOST_NAME_MAX declaration. I've looked into the sys/syslimits.h headers,
but it turned out that it contains:
| /*
|  * We leave the following values undefined to force applications to either
|  * assume conservative values or call sysconf() to get the current value.
|  *
|  * HOST_NAME_MAX
|  *
|  * (We should do this for most of the values currently defined here,
|  * but many programs are not prepared to deal with this yet.)
|  */

As the failing build is examples/echo/echo-server.cpp, I assumed a quick
and dirty workaround might do, see the attached patch. FWIW, the
_POSIX_HOST_NAME_MAX #define is in /usr/include/bits/posix1_lim.h,
included through limits.h.

Thanks for considering.

Mraw,
KiBi.
--- a/build-tree/dbus-c++/examples/echo/echo-server.cpp
+++ b/build-tree/dbus-c++/examples/echo/echo-server.cpp
@@ -9,6 +9,10 @@
 #include <stdio.h>
 #include <limits.h>
 
+#if !defined(HOST_NAME_MAX) && defined(_POSIX_HOST_NAME_MAX)
+#define HOST_NAME_MAX _POSIX_HOST_NAME_MAX
+#endif
+
 static const char *ECHO_SERVER_NAME = "org.freedesktop.DBus.Examples.Echo";
 static const char *ECHO_SERVER_PATH = "/org/freedesktop/DBus/Examples/Echo";
 

Reply via email to