Closed Bug 256508 Opened 15 years ago Closed 15 years ago
uxwrap: Poll() on Open
BSD 3 .5
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; fr-FR; rv:1.7.2) Gecko/20040803 Build Identifier: rv:1.7.2 & 1.8alpha3 Compilation problem: uxwrap (3.14) The poll() declaration doesn't correspond with /usr/include/sys/poll.h 348: int poll(struct pollfd *filedes, int nfsds, int timeout) should be as for NETBSD: 348: int poll(struct pollfd *filedes, nfsds_t nfsds, int timeout) OPENBSD 3.5/gcc 2.95.3/i386 Reproducible: Always Steps to Reproduce:
Darin, could you take care of this? Julien: does OpenBSD have a pthread library now? If so, you can try configure NSPR with --with-pthreads to work around this problem.
Assignee: wchang0222 → darin
Status: UNCONFIRMED → NEW
Ever confirmed: true
The file is: nsprpub/pr/src/md/unix/uxwrap.c There is a pthread lib. with the option --with-pthreads it seems to work. libnspr4.a compiles fine
If there is a pthread library, we recommend that you use it (i.e., configure NSPR with --with-pthreads). In any case, we will check in the simple fix for uxwrap.c.
The existing code must have been valid on some version of OpenBSD, right? If so, then don't we still need to support the older versions? If not, then yeah... the patch is pretty trivial. But, if otherwise, can someone suggest a patch? I don't have access to any OpenBSD systems.
I'm got firefox 1.0 RC1 running on OpenBSD 3.3 with --with-pthreads. That's about the oldest version of OpenBSD anyone is likely to run this code on, so I don't think we need to make the non-pthreads code work.
Given comment 2 and comment 5, I think it is not worth it to fix uxwrap.c. Instead, we should make --with-pthreads the default for OpenBSD. Could you test this patch? After you apply this patch, you need to run autoconf (2.13, not 2.5x) in mozilla/nsprpub to regenerate mozilla/nsprpub/configure. Thanks.
Jim, Julien, could you test my patch?
Status: NEW → ASSIGNED
Your patch works for me on OpenBSD 3.6. I recommend also patching nsprpub/configure and then commit.
Marked the bug WONTFIX because I didn't fix the uxwrap.c problem originally reported. Instead, I checked in a patch on the NSPR tip (NSPR 4.6) and NSPRPUB_PRE_4_2_CLIENT_BRANCH (Mozilla 1.8 Beta 2) to make --with-pthreads the default on OpenBSD. If pthreads are used, we do not compile the code in uxwrap.c.
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → WONTFIX
Target Milestone: --- → 4.6
You may want to also mark Bug 269591 as resolved/wontfix. It's a duplicate of this bug.
*** Bug 269591 has been marked as a duplicate of this bug. ***
Changed the resolution of this bug to FIXED because I just checked in the fix for the poll prototype on the NSPR trunk (NSPR 4.6). The patch is attached to bug 269591. So NSPR 4.6 has both a workaround and a fix.
Status: REOPENED → RESOLVED
Closed: 15 years ago → 15 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.