| Anonymous | Login | Signup for a new account | 11-10-2008 11:34 PST |
| Main | My View | View Issues | Change Log | Docs |
| Viewing Issue Simple Details [ Jump to Notes ] | [ View Advanced ] [ Issue History ] [ Print ] | |||||||||||
| ID | Category | Severity | Reproducibility | Date Submitted | Last Update | |||||||
| 0002074 | [uClibc] Other | minor | always | 02-07-08 19:49 | 04-12-08 17:15 | |||||||
| Reporter | michael_d | View Status | public | |||||||||
| Assigned To | uClibc | |||||||||||
| Priority | normal | Resolution | open | |||||||||
| Status | assigned | Product Version | ||||||||||
| Summary | 0002074: 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 0001874 and 0002064 must be applied before compilation of uClibc is possible on this platform.) |
|||||||||||
| Additional Information | ||||||||||||
| Attached Files |
|
|||||||||||
|
|
||||||||||||
Notes |
|
|
(0004924) 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 |
|
(0005704) 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. |
|
(0005824) vapier 03-21-08 00:02 |
erm, no, lets not do that ... just add a check via KERNEL_VERSION() and LINUX_VERSION_CODE |
|
(0006474) 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. |
|
(0006594) michael_d 04-12-08 17:15 |
I dislike hardcoding things via the kernel version, since that assumes things do not get backported. Sure, it's unlikely with an old kernel, but a poll() "backport" for 2.0.* actually existed at one time in the form of the LiS patches. I've uploaded a new version, which compromises a little. I've created a central header <bits/uClibc_khpresence.h>, which holds information on which kernel headers are actually present. However, while this header could be generated with a little shell/find/sed magic, for know it's just faked using LINUX_VERSION_CODE, and only for headers of interest. (The header also covers <asm/ipcbuf.h>, which while not needed for the immediate problem, will help with a solution to 0002084.) |
| Copyright © 2000 - 2006 Mantis Group |