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

Re: A small thanks to the kFreeBSD porters

Tino Mettler wrote:
> The exact problem was this build failure:
> https://buildd.debian.org/status/fetch.php?pkg=syncevolution&arch=kfreebsd-amd64&ver=
> I don't know if SOCK_CLOEXEC is just unavailable on Debian/kFreeBSD (as
> stock FreeBSD seems to support it), or if different includes are
> required.

A good reference for this kind of thing is fxr.watson.org:
which shows it is understood by the kernel, and defined in FreeBSD's
<sys/socket.h> (requiring -DUSE_BSD to use it, I guess because it's
not POSIX).

Debian GNU/kFreeBSD's <sys/socket.h> comes from glibc however:

We provide the original FreeBSD header at <sys/kglue/sys/socket.h>
but it is probably not a good idea to use it.

glibc seems to define SOCK_CLOEXEC via "bits" headers on linux and
hurd but not kfreebsd;  we could *probably* do likewise but I don't
think we should add it for jessie so late.

Your package seems to assume SOCK_CLOEXEC is always supported.  So you
perhaps could just embed the FreeBSD definition e.g.:

#ifdef __FreeBSD_kernel__
#define SOCK_CLOEXEC 02000000

But I like that you have added code to support platforms not having
SOCK_CLOEXEC, I think I actually prefer to keep that, for now.

Steven Chamberlain

Reply to: