Bug 88936 - Fail to build on FreeBSD because of missing includes
Summary: Fail to build on FreeBSD because of missing includes
Alias: None
Product: Spice
Classification: Unclassified
Component: usbredir (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) FreeBSD
: medium normal
Assignee: Hans de Goede
QA Contact:
Depends on:
Reported: 2015-02-03 08:47 UTC by Ting-Wei Lan
Modified: 2015-02-03 08:58 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Description Ting-Wei Lan 2015-02-03 08:47:58 UTC
usbredir cannot be built on FreeBSD because of missing includes. Here is the error message:

usbredirserver.c:200:25: error: variable has incomplete type 'struct sockaddr_in6'
    struct sockaddr_in6 serveraddr;
usbredirserver.c:200:12: note: forward declaration of 'struct sockaddr_in6'
    struct sockaddr_in6 serveraddr;
usbredirserver.c:287:30: warning: implicit declaration of function 'htons' is invalid in C99 [-Wimplicit-function-declaration]
    serveraddr.sin6_port   = htons(port);
usbredirserver.c:288:30: error: use of undeclared identifier 'in6addr_any'
    serveraddr.sin6_addr   = in6addr_any;
1 warning and 2 errors generated.

Patches to fix the problem are available in FreeBSD ports. I think we can remove #ifdef __FreeBSD__ in the patches.
Comment 1 Hans de Goede 2015-02-03 08:58:01 UTC
Thanks for the bug report. I've just pushed a patch to usbredir git master adding the missing includes without the unnecessary #ifdefs.

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.