Project

General

Profile

Actions

Bug #2859

closed

fdevent_solaris_port.c header missing on Solaris 10

Added by dreadbit about 6 years ago. Updated about 6 years ago.

Status:
Fixed
Priority:
Low
Category:
core
Target version:
ASK QUESTIONS IN Forums:

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>

Actions #1

Updated by gstrauss about 6 years 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.

Actions #2

Updated by gstrauss about 6 years 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.

Actions #3

Updated by gstrauss about 6 years 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;
Actions #4

Updated by dreadbit about 6 years 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.

Actions #5

Updated by gstrauss about 6 years ago

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

Also available in: Atom