[uClibc 0002074]: poll() does not work on Linux 2.0.40
bugs at busybox.net
bugs at busybox.net
Wed Apr 9 06:30:46 UTC 2008
A NOTE has been added to this issue.
======================================================================
http://busybox.net/bugs/view.php?id=2074
======================================================================
Reported By: michael_d
Assigned To: uClibc
======================================================================
Project: uClibc
Issue ID: 2074
Category: Other
Reproducibility: always
Severity: minor
Priority: normal
Status: assigned
======================================================================
Date Submitted: 02-07-2008 19:49 PST
Last Modified: 04-08-2008 23:30 PDT
======================================================================
Summary: poll() does not work on Linux 2.0.40
Description:
When compiled for Linux 2.0.40, the poll() function will not work, always
returning ENOSYS.
While that kernel does not implement the poll syscall, there is a complete
emulation within uClibc's source, which works fine but is not normally
compiled in.
The problem is that this kernel's <asm/unistd.h> defines __NR_poll, even
though it does not implement the syscall. uClibc blindly assumes that the
call will work if its number is defined, and discards the emulation to save
space.
To fix this, the library needs to check for the presence of the
<asm/poll.h> header, rather than just seeing if the syscall number is
defined.
I've worked around this locally by editing <asm/unistd.h> to remove
__NR_poll.
(Note that fixes for issues http://busybox.net/bugs/view.php?id=1874 and
http://busybox.net/bugs/view.php?id=2064 must be applied before
compilation of uClibc is possible on this platform.)
======================================================================
----------------------------------------------------------------------
vapier - 02-15-08 15:39
----------------------------------------------------------------------
please see the FAQ:
http://uclibc.org/FAQ.html#upstream_versions
in other words, please post a patch that addresses the issue for you
----------------------------------------------------------------------
michael_d - 03-13-08 05:18
----------------------------------------------------------------------
I've uploaded a patch, which checks whether the kernel headers include
<asm/poll.h>. If that header is not present, it's unlikely the kernel
really supports the syscall.
----------------------------------------------------------------------
vapier - 03-21-08 00:02
----------------------------------------------------------------------
erm, no, lets not do that ... just add a check via KERNEL_VERSION() and
LINUX_VERSION_CODE
----------------------------------------------------------------------
khem - 04-08-08 23:30
----------------------------------------------------------------------
kernel should not export NR_poll if it does not implement the syscall. So
fix in the kernel headers what you did is right thing to do. Nothing is
needed to be done in uclibc in my opinion.
Issue History
Date Modified Username Field Change
======================================================================
02-07-08 19:49 michael_d New Issue
02-07-08 19:49 michael_d Status new => assigned
02-07-08 19:49 michael_d Assigned To => uClibc
02-15-08 15:39 vapier Note Added: 0004924
03-13-08 05:15 michael_d File Added: uClibc-0.9.29-pollfix.diff
03-13-08 05:18 michael_d Note Added: 0005704
03-21-08 00:02 vapier Note Added: 0005824
04-08-08 23:30 khem Note Added: 0006474
======================================================================
More information about the uClibc-cvs
mailing list