[Pkg-kannel-devel] Bug#820155: kannel: FTBFS[!linux]: FTW_PHYS undeclared, etc.

Steven Chamberlain steven at pyro.eu.org
Tue Apr 5 22:13:51 UTC 2016


Package: kannel
Version: 1.4.4-2
Severity: important
Tags: patch
User: debian-bsd at lists.debian.org
Usertags: kfreebsd

Hi,

kannel stopped building on kfreebsd, and one of the problems is:

utils/start-stop-daemon.c:94:2: error: #error Unknown architecture - cannot build start-stop-daemon

The attached 35_kfreebsd.patch uses the __FreeBSD_kernel__ macro to
detect platforms based on the FreeBSD kernel, besides FreeBSD itself.


The next problem is the same as seen on hurd-i386:

| gcc -D_REENTRANT=1 -I. -Igw -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wall -D_LARGE_FILES= -I/usr/include/libxml2  -Wall -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Winline -Wformat -Wformat-security -Wmissing-format-attribute -I/usr/include -I/usr/include/mysql -I/usr/include/postgresql -I/usr/include/hiredis -I/usr/include -o gw/dlr_spool.o -c gw/dlr_spool.c
| ...
| gw/dlr_spool.c:254:86: error: ‘FTW_PHYS’ undeclared (first use in this function)

To get that definition (from ftw.h) requires _XOPEN_SOURCE>=500 and
_XOPEN_SOURCE_EXTENDED.  Later, to get pthread_rwlock_t requires
_POSIX_C_SOURCE >= 200112L...

test/test_file_traversal.c has the same bug and requires
_XOPEN_SOURCE>=500 and __USE_MISC...

A nice shorthand might be to define _GNU_SOURCE which includes all of
those and its presence shouldn't break any non-GNU platforms.

Finally there is this warning in gw/smsc/http/clickatell.c:

| gcc -D_REENTRANT=1 -I. -Igw -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wall -D_LARGE_FILES= -I/usr/include/libxml2  -Wall -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Winline -Wformat -Wformat-security -Wmissing-format-attribute -I/usr/include -I/usr/include/mysql -I/usr/include/postgresql -I/usr/include/hiredis -I/usr/include -o gw/smsc/smsc_http.o -c gw/smsc/smsc_http.c
| In file included from gw/smsc/smsc_http.c:864:0:
| gw/smsc/http/clickatell.c: In function ‘clickatell_receive_sms’:
| gw/smsc/http/clickatell.c:235:9: warning: implicit declaration of function ‘strptime’ [-Wimplicit-function-declaration]

which can also be fixed by defining _GNU_SOURCE.

The attached 36_nonlinux.patch has all of that.  I tested only that it
builds on kfreebsd-amd64 sid, but hopefully it fixes hurd builds too.

Thanks!

-- System Information:
Debian Release: stretch/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: kfreebsd-amd64 (x86_64)

Kernel: kFreeBSD 10.1-0-amd64
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 35_kfreebsd.patch
Type: text/x-diff
Size: 689 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-kannel-devel/attachments/20160405/d3686d22/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 36_nonlinux.patch
Type: text/x-diff
Size: 915 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-kannel-devel/attachments/20160405/d3686d22/attachment-0001.patch>


More information about the Pkg-kannel-devel mailing list