|Summary:||FTBFS on kfreebsd-*|
|Product:||realmd||Reporter:||Laurent Bigonville <bigon>|
|Component:||adcli||Assignee:||Stef Walter <stefw>|
|Status:||RESOLVED FIXED||QA Contact:|
|i915 platform:||i915 features:|
|Attachments:||Declare HOST_NAME_MAX if it's not already done|
Description Laurent Bigonville 2013-07-01 13:08:53 UTC
Hi, adcli is FTBFS on debian kfreebsd-* variants with the following error: CC libadcli_la-adconn.lo adconn.c: In function 'ensure_host_fqdn': adconn.c:87:16: error: 'HOST_NAME_MAX' undeclared (first use in this function) char hostname[HOST_NAME_MAX + 1]; ^ adconn.c:87:16: note: each undeclared identifier is reported only once for each function it appears in adconn.c:87:7: warning: unused variable 'hostname' [-Wunused-variable] char hostname[HOST_NAME_MAX + 1]; ^ For the full logs, please see: https://buildd.debian.org/status/fetch.php?pkg=adcli&arch=kfreebsd-amd64&ver=0.7.1-1&stamp=1372672222
Comment 1 Stef Walter 2013-07-01 16:27:50 UTC
Are you able to provide a patch for this? I don't have a kFreeBSD box at my disposal.
Comment 2 Laurent Bigonville 2013-07-06 15:11:59 UTC
Hi, I've asked to the debian-kfreebsd porters and you should either define HOST_NAME_MAX with a sensible value if it's not already done (255?, I'm actually not sure) or you could also use the xgethostname() function in the following patch. http://patch-tracker.debian.org/patch/series/view/dbus-c++/0.9.0-6/01_host_name_max.patch
Comment 3 Laurent Bigonville 2013-07-06 15:14:27 UTC
Or you could also ask for the _SC_HOST_NAME_MAX value via sysconf(3)
Comment 4 Stef Walter 2013-07-09 08:47:36 UTC
Thank you for the advice. However again, I usually expect esoteric systems to provide patches for their build issues. Otherwise there's a fruitless back and forth with patch after patch (does this fix it? yes but now there's this other problem... does this fix it? no? how about this?). Thanks for understanding and looking forward to your patch.
Comment 5 Laurent Bigonville 2013-07-09 14:07:24 UTC
Created attachment 82235 [details] [review] Declare HOST_NAME_MAX if it's not already done
Comment 6 Laurent Bigonville 2013-07-09 14:08:53 UTC
The patch fix the build for freebsd, but unfortunately I cannot test it as I'm not running debian kfreebsd myself
Comment 7 Stef Walter 2013-07-09 14:48:10 UTC
Thanks. Pushed to git master.