Bug 66456 - FTBFS on kfreebsd-*
Summary: FTBFS on kfreebsd-*
Alias: None
Product: realmd
Classification: Unclassified
Component: adcli (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Stef Walter
QA Contact:
Depends on:
Reported: 2013-07-01 13:08 UTC by Laurent Bigonville
Modified: 2013-07-09 14:48 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:

Declare HOST_NAME_MAX if it's not already done (777 bytes, patch)
2013-07-09 14:07 UTC, Laurent Bigonville
Details | Splinter Review

Description Laurent Bigonville 2013-07-01 13:08:53 UTC

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

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.

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.

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.