Add support for Oracle Solaris#4
Conversation
| #ifdef __cplusplus | ||
| #include <mutex> | ||
| #include <condition_variable> | ||
| using std::mutex; |
There was a problem hiding this comment.
This global scope using-declaration conflicts with another mutex typedef in <sys/mutex.h> on Solaris. Removed as it's not used anywhere in the project.
| struct sockaddr sa; | ||
| struct sockaddr_in sin; | ||
| struct sockaddr_in6 sin6; | ||
| } sockaddr_un; |
There was a problem hiding this comment.
I believe the "un" here means "union", however, in <sys/un.h>, there is a sockaddr_un for Unix domains sockets where "un" means "Unix". On Solaris, <sys/un.h> is included by <sys/socket.h>, resulting in compilation error.
This issue also concerns Linux or BSD if libhv's going to support Unix domain sockets in the future. This conflict is not specific to Solaris, for sockaddr_un conforms to IEEE Std 1003.1-2008, and platforms like Linux and BSD also use that name.
Renaming to sockaddr_u is recommended.
| // ms | ||
| unsigned int gettick(); | ||
|
|
||
| #ifndef OS_SOLARIS // Solaris has built-in gethrtime(). |
There was a problem hiding this comment.
Solaris has built-in gethrtime() in <sys/time.h> for high resolution time support, and also returns nanoseconds. Use that instead.
|
Nice work for evport, thanks very much! |
Changes:
Testing: