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
Are you able to provide a patch for this? I don't have a kFreeBSD box at my disposal.
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
Or you could also ask for the _SC_HOST_NAME_MAX value via sysconf(3)
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.
Created attachment 82235 [details] [review] Declare HOST_NAME_MAX if it's not already done
The patch fix the build for freebsd, but unfortunately I cannot test it as I'm not running debian kfreebsd myself
Thanks. Pushed to git master.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.