Re: Bug#764692: usbmuxd: FTBFS on kfreebsd-*
tags 764692 + patch
thanks
Hi,
[adding -glibc@ and -bsd@ to Cc:]
On 10/10/14 10:47, Jonathan Wiltshire wrote:
> CC usbmuxd-device.o
> device.c: In function 'send_anon_rst':
> device.c:264:4: error: 'struct tcphdr' has no member named 'th_sport'
> th.th_sport = htons(sport);
glibc-provided features.h no longer defines a __FAVOR_BSD macro, so the
BSD version of struct tcphdr in netinet/tcp.h cannot be used, even if
_BSD_SOURCE was requested as it was in this case:
src/device.c:
> 22 #define _BSD_SOURCE
[...]
> 28 #include <sys/time.h>
> 29 #include <netinet/in.h>
> 30 #include <netinet/tcp.h>
It works to define __FAVOR_BSD here (patch attached), but I wonder if
that should be fixed in glibc headers somehow?
There are already many users of netinet/tcp.h that define __FAVOR_BSD
however: http://codesearch.debian.net/search?q=define+__FAVOR_BSD
Regards,
--
Steven Chamberlain
steven@pyro.eu.org
--- a/src/device.c
+++ b/src/device.c
@@ -20,6 +20,7 @@
*/
#define _BSD_SOURCE
+#define __FAVOR_BSD
#ifdef HAVE_CONFIG_H
#include <config.h>
Reply to: