[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug#764692: glibc removed __FAVOR_BSD from features.h



Hi Guillem,

Would a BSD-style netinet/tcp.h be a good candidate to ship in libbsd-dev?

> On 12/10/14 16:45, Steven Chamberlain wrote:
>> 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, [...]

glibc upstream has deliberately removed the BSD-style tcphdr definition
which was available until now using _BSD_SOURCE.  That broke packages
usbmuxd, dns-flood-detector that I know of so far.

> Since glibc 2.19,
> _BSD_SOURCE no longer causes BSD definitions to be preferred
> in case of conflicts.

> Since glibc 2.20, this macro is deprecated.

Patching affected software to use libbsd seems like a good idea to me?

Another sad thing I saw is that dozens of packages decided to embed a
BSD-style tcphdr definition in their code, because it wasn't readily
available:
http://codesearch.debian.net/search?q=th_dport

The BSD form of this struct dates back at least 20 years, is still
defined like this the BSDs, Mac OS X, possibly AIX, Solaris and its
derivatives.

Regards,
-- 
Steven Chamberlain
steven@pyro.eu.org


Reply to: