Bug#782418: cwm: FTBFS on kfreebsd: kbfunc.c:327:18: error: 'HOST_NAME_MAX' undeclared
On Sat, Apr 18, 2015 at 08:37:00PM +0200, Jakub Wilk wrote: The patch itself looks good to me, but the patch header is no longer accurate. Fixed. -- James McDonald signature.asc Description: Digital signature
Bug#782418: cwm: FTBFS on kfreebsd: kbfunc.c:327:18: error: 'HOST_NAME_MAX' undeclared
On Thu, Apr 16, 2015 at 10:42:37PM +0200, Jakub Wilk wrote: I don't think this is correct. At least on FreeBSD 9.0, sysconf(_SC_HOST_NAME_MAX) returns always -1 (which means that there is no limit), so the size of hostbuf is 0. Ahh, that's unfortunate. I tested on FreeBSD 10.0 which was a poor choice. The comments in the FreeBSD syslimits.h implied that sysconf() was the way to go. Portability is complicated! How about falling back to _POSIX_HOST_NAME_MAX (which is 255, which should hopefully be enough for everybody) if HOST_NAME_MAX is not defined? That's a sensible alternative. In fact, I discovered upstream have applied that exact solution for the upcoming version to allow building on MacOS X which is BSDish. I have modified the patch and tested building and using the related SSH functionality on Debian GNU/kFreeBSD stable, where it now works fine. Thanks for the sanity checking. The updated package is on mentors. -- James McDonald signature.asc Description: Digital signature
Bug#782418: cwm: FTBFS on kfreebsd: kbfunc.c:327:18: error: 'HOST_NAME_MAX' undeclared
[Please CC me, I'm not subscribed to this bug.] * James McDonald ja...@jamesmcdonald.com, 2015-04-18, 12:47: How about falling back to _POSIX_HOST_NAME_MAX (which is 255, which should hopefully be enough for everybody) if HOST_NAME_MAX is not defined? That's a sensible alternative. In fact, I discovered upstream have applied that exact solution for the upcoming version to allow building on MacOS X which is BSDish. I have modified the patch and tested building and using the related SSH functionality on Debian GNU/kFreeBSD stable, where it now works fine. The patch itself looks good to me, but the patch header is no longer accurate. -- Jakub Wilk -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#782418: cwm: FTBFS on kfreebsd: kbfunc.c:327:18: error: 'HOST_NAME_MAX' undeclared
* James McDonald ja...@jamesmcdonald.com, 2015-04-13, 19:06: I have prepared 5.6-2 with a patch for this which builds on both Linux and kFreeBSD. Where can I get this new version? I can't see anything on mentors.d.n. [...] http://mentors.debian.net/debian/pool/main/c/cwm/cwm_5.6-2.dsc The relevant change is: - char hostbuf[HOST_NAME_MAX+1]; + char hostbuf[sysconf(_SC_HOST_NAME_MAX)+1]; I don't think this is correct. At least on FreeBSD 9.0, sysconf(_SC_HOST_NAME_MAX) returns always -1 (which means that there is no limit), so the size of hostbuf is 0. How about falling back to _POSIX_HOST_NAME_MAX (which is 255, which should hopefully be enough for everybody) if HOST_NAME_MAX is not defined? -- Jakub Wilk -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#782418: cwm: FTBFS on kfreebsd: kbfunc.c:327:18: error: 'HOST_NAME_MAX' undeclared
On Mon, Apr 13, 2015 at 06:31:38PM +0200, Jakub Wilk wrote: * James McDonald ja...@jamesmcdonald.com, 2015-04-12, 09:18: I have prepared 5.6-2 with a patch for this which builds on both Linux and kFreeBSD. Where can I get this new version? I can't see anything on mentors.d.n. It is indeed on mentors in the usual place: http://mentors.debian.net/package/cwm or directly at: http://mentors.debian.net/debian/pool/main/c/cwm/cwm_5.6-2.dsc -- James McDonald -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#782418: cwm: FTBFS on kfreebsd: kbfunc.c:327:18: error: 'HOST_NAME_MAX' undeclared
* James McDonald ja...@jamesmcdonald.com, 2015-04-12, 09:18: I have prepared 5.6-2 with a patch for this which builds on both Linux and kFreeBSD. Where can I get this new version? I can't see anything on mentors.d.n. -- Jakub Wilk -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#782418: cwm: FTBFS on kfreebsd: kbfunc.c:327:18: error: 'HOST_NAME_MAX' undeclared
On Sat, Apr 11, 2015 at 11:50:05PM +0200, Jakub Wilk wrote: | kbfunc.c:327:18: error: 'HOST_NAME_MAX' undeclared (first use in this function) It looks like FreeBSD forces people to call sysconf() to get the value using _SC_HOST_NAME_MAX instead of defining HOST_NAME_MAX itself. Fortunately this approach appears to be portable to Linux (and other BSDs). I have prepared 5.6-2 with a patch for this which builds on both Linux and kFreeBSD. -- James McDonald signature.asc Description: Digital signature
Bug#782418: cwm: FTBFS on kfreebsd: kbfunc.c:327:18: error: 'HOST_NAME_MAX' undeclared
Source: cwm Version: 5.6-1 Severity: important User: debian-...@lists.debian.org Usertags: kfreebsd cwm FTBFS on kfreebsd-*: | cc -c -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wall -O2 -g -D_GNU_SOURCE -D_FORTIFY_SOURCE=2 `pkg-config --cflags fontconfig x11 xft xinerama xrandr` kbfunc.c | kbfunc.c: In function 'kbfunc_ssh': | kbfunc.c:327:18: error: 'HOST_NAME_MAX' undeclared (first use in this function) | charhostbuf[HOST_NAME_MAX+1]; | ^ | kbfunc.c:327:18: note: each undeclared identifier is reported only once for each function it appears in | kbfunc.c:327:10: warning: unused variable 'hostbuf' [-Wunused-variable] | charhostbuf[HOST_NAME_MAX+1]; | ^ | make[2]: *** [kbfunc.o] Error 1 | Makefile:37: recipe for target 'kbfunc.o' failed Full build logs: https://buildd.debian.org/status/fetch.php?pkg=cwmarch=kfreebsd-i386ver=5.6-1stamp=1428775896 https://buildd.debian.org/status/fetch.php?pkg=cwmarch=kfreebsd-amd64ver=5.6-1stamp=1428776101 -- Jakub Wilk -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org