[Pkg-javascript-devel] Bug#759673: Patch to fix libuv on the hppa architecture (value of O_NONBLOCK possibly different than SOCK_NONBLOCK)

Helge Deller deller at gmx.de
Fri Aug 29 09:59:46 UTC 2014


Package: libuv-dev
Version: 0.10.28-3
Severity: normal
Tags: patch

Building on the hppa/parisc arch fails, because libuv fails to run sucessfully quite some integrated tests as can be seen in this log:
http://buildd.debian-ports.org/status/fetch.php?pkg=libuv&arch=hppa&ver=0.10.28-3&stamp=1409185348

I invested some time to find the reason why it fails, and it turned out that it happens because there is an
assumption in the libuv linux-syscalls.h header file, that on all Linux platforms the value of O_NONBLOCK is the same as SOCK_NONBLOCK.
That's at least not true for hppa.

In src/unix/linux-syscalls.h we have for hppa:
# define UV__O_NONBLOCK       0x10004  (hppa)
and later down:
#define UV__SOCK_NONBLOCK     UV__O_NONBLOCK

This means, libuv uses even for socket syscalls UV__O_NONBLOCK instead of the value of SOCK_NONBLOCK.
So, when the tests run, the kernel will correctly return -EINVAL on most socket syscalls and thus the libuv testcases fail.

The attached trivial patch fixes this problem on the hppa platform and it should be safe to use it for all other platforms too.

It would be great if you could apply it to the next upload of libuv.

Thanks,
Helge
-------------- next part --------------
A non-text attachment was scrubbed...
Name: libuv.hppa.patch
Type: text/x-patch
Size: 837 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-javascript-devel/attachments/20140829/776eba36/attachment.bin>


More information about the Pkg-javascript-devel mailing list