Project

General

Profile

Bug #2859

fdevent_solaris_port.c header missing on Solaris 10

Added by dreadbit 7 months ago. Updated 6 months ago.

Status:
Fixed
Priority:
Low
Assignee:
-
Category:
core
Target version:
Start date:
2018-01-22
Due date:
% Done:

100%

Estimated time:
Missing in 1.5.x:

Description

Solaris/Sparc 10 1/13 , gcc 5.5.0

Symptom:
fdevent_solaris_port.c:21:49: error: 'POLLIN' undeclared here (not in a function)
static const int SOLARIS_PORT_POLL_READ = POLLIN;

Solution:
#include <inet/ip.h>

Associated revisions

Revision 978a3f8d (diff)
Added by gstrauss 7 months ago

[core] add include sys/poll.h on Solaris (fixes #2859)

x-ref:
"fdevent_solaris_port.c header missing on Solaris 10"
https://redmine.lighttpd.net/issues/2859

History

#1

Updated by gstrauss 7 months ago

According to Oracle's man page (on the web), #include <port.h> is what is needed. See the example near the bottom of the page.
https://docs.oracle.com/cd/E23823_01/html/816-5168/port-associate-3c.html
Maybe we need an additional feature #define to get POLLIN? You'll have to look in the system headers. Sorry, I do not have access to a Solaris 10 system.

Now then, I can add an additional include, but inet/ip.h does not seem to be the minimal required. Perhaps sys/ioctl.h or sys/filio.h? Event ports work on more than just IP sockets, so the include for this define should be something more general.

Please take another look. Thanks.

#2

Updated by gstrauss 7 months ago

  • Status changed from New to Patch Pending
  • Priority changed from Normal to Low
  • Target version changed from 1.4.x to 1.4.49

Looking through https://github.com/illumos/illumos-gate, it would appear that #include <sys/poll.h> would fit the bill.

#3

Updated by gstrauss 7 months ago

--- a/src/fdevent_solaris_port.c
+++ b/src/fdevent_solaris_port.c
@@ -15,6 +15,7 @@

 #ifdef FDEVENT_USE_SOLARIS_PORT

+#include <sys/poll.h>
 static const int SOLARIS_PORT_POLL_READ       = POLLIN;
 static const int SOLARIS_PORT_POLL_WRITE      = POLLOUT;
 static const int SOLARIS_PORT_POLL_READ_WRITE = POLLIN & POLLOUT;
#4

Updated by dreadbit 7 months ago

gstrauss wrote:

+#include <sys/poll.h>

This works on Solaris 10, too. Briefly looking at Solaris 10, I could not find a way to solve this with some #define.

#5

Updated by gstrauss 6 months ago

  • Status changed from Patch Pending to Fixed
  • % Done changed from 0 to 100

Also available in: Atom