Bug #2859
closedfdevent_solaris_port.c header missing on Solaris 10
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>
Updated by gstrauss almost 7 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.
Updated by gstrauss almost 7 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.
Updated by gstrauss almost 7 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;
Updated by dreadbit almost 7 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.
Updated by gstrauss almost 7 years ago
- Status changed from Patch Pending to Fixed
- % Done changed from 0 to 100
Applied in changeset 978a3f8dad09d0d3c7150be0ede9711af7155c2f.
Also available in: Atom