[PATCH STABLE] osutil: disable compilation of recvfds() on unsupported platforms

Yuya Nishihara yuya at tcha.org
Wed Feb 3 13:56:07 UTC 2016


On Wed, 03 Feb 2016 01:53:58 +0900, FUJIWARA Katsunori wrote:
> At Tue, 02 Feb 2016 21:16:29 +0900,
> Yuya Nishihara wrote:
> > # HG changeset patch
> > # User Yuya Nishihara <yuya at tcha.org>
> > # Date 1454414208 -32400
> > #      Tue Feb 02 20:56:48 2016 +0900
> > # Branch stable
> > # Node ID ae78af2ef11009409a3ca73a7b230404ae3ae321
> > # Parent  f5d06d31b7937249ed8e02fa3ea5af867130eb2d
> > osutil: disable compilation of recvfds() on unsupported platforms
> > 
> > It appears that Solaris doesn't provide CMSG_LEN(), msg_control, etc. As
> > recvfds() is only necessary for chg, this patch just drops it if CMSG_LEN
> > isn't defined, which is the same workaround as Python 3.x.
> > 
> > https://hg.python.org/cpython/rev/c64216addd7f#l7.33
> 
> I can confirm that patch this fixes the compilation problem on Solaris
> (oi151a2, a little old one).

Thanks.

> BTW, on Solaris, accessing _libc.recvmsg below in pure/osutil.py also
> causes failure of loading it, because 'recvmsg()' is provided via not
> libc.so but libsocket.so :-<
> 
>     _libc = ctypes.CDLL(ctypes.util.find_library('c'), use_errno=True)
>     _recvmsg = _libc.recvmsg

Oh, I'll send a patch soon which will be mostly the same as your suggestion.


More information about the Mercurial-devel mailing list