Hi all,

I'm a maintainer of the Python gevent library which wraps libev. Recently, we 
received a bug report [1] from a user claiming compilation issues on SmartOS 
[2], which is a variant of OpenIndiana/Illumos [3], the open versions of 
Solaris. 

Specifically, it turns out that Illumos now ships with an implementation of 
`inotify` [4], including the header and init function. This is detected by the 
`configure` script and EV_USE_INOTIFY is defined. However, the Illumos 
definition for `struct statfs` is incompatible with the Linux version, so 
compilation fails.

This has been reported as a problem with other software, for example one of 
Facebook's projects at [5]. In that project, they were able to make a code 
change to prefer the port backend and ignore the inotify support. This seems 
better than hacking on `configure` as reported to gevent and to Facebook. It 
looks to me like this should be possible in ev.c as well using something like 
the following patch (setting EV_USE_INOTIFY to 0 if the Solaris port watchers 
are detected):


--- a/libev/ev.c
+++ b/libev/ev.c
@@ -127,6 +127,7 @@
 # endif

 # if HAVE_PORT_H && HAVE_PORT_CREATE
+#  define EV_USE_INOTIFY 0
 #  ifndef EV_USE_PORT
 #   define EV_USE_PORT EV_FEATURE_BACKENDS
 #  endif

I'm not able to test this and I haven't gotten feedback from our user. Has 
anyone run into this before and solved it in a better way? If not, does this 
seem like a reasonable approach? Or should this particular platform not be 
considered supported at this time?

Thanks,
Jason


[1] https://github.com/gevent/gevent/pull/711
[2] https://smartos.org
[3] http://wiki.illumos.org/display/illumos/illumos+Home
[4] 
https://github.com/joyent/illumos-joyent/blob/master/usr/src/uts/common/io/inotify.c
[5] https://github.com/facebook/watchman/issues/84
_______________________________________________
libev mailing list
[email protected]
http://lists.schmorp.de/mailman/listinfo/libev

Reply via email to