]> go.fuhry.dev Git - fsnotify.git/commitdiff
inotify: switch to epoll_create1
authorRiku Voipio <riku.voipio@linaro.org>
Mon, 2 Nov 2015 19:39:13 +0000 (21:39 +0200)
committerNathan Youngman <git@nathany.com>
Tue, 17 Nov 2015 20:37:58 +0000 (13:37 -0700)
Epoll_create was replaced with epoll_create1 in linux 2.6.27. The older
syscall isn't available on new architectures (such as arm64).

closes #100

CHANGELOG.md
README.md
inotify_poller.go

index b0bfea07c3e8a8d46436653923863f4ce5c2f2d3..83c226af5006d3e7b49eabde64bb8db9527f5328 100644 (file)
@@ -1,5 +1,9 @@
 # Changelog
 
+## master / 2015-10-17
+
+* inotify: use epoll_create1 for arm64 support (requires Linux 2.6.27 or later) [#100](https://github.com/go-fsnotify/fsnotify/pull/100) (thanks @suihkulokki)
+
 ## v1.2.1 / 2015-10-14
 
 * kqueue: don't watch named pipes [#98](https://github.com/go-fsnotify/fsnotify/pull/98) (thanks @evanphx)
index 736c0d27a6c71eb449b347576def791b876de0e9..f2b432e96a95d84c0e84f9f3b635fce053993f9d 100644 (file)
--- a/README.md
+++ b/README.md
@@ -8,7 +8,7 @@ Cross platform: Windows, Linux, BSD and OS X.
 
 |Adapter   |OS        |Status    |
 |----------|----------|----------|
-|inotify   |Linux, Android\*|Supported [![Build Status](https://travis-ci.org/go-fsnotify/fsnotify.svg?branch=master)](https://travis-ci.org/go-fsnotify/fsnotify)|
+|inotify   |Linux 2.6.27 or later, Android\*|Supported [![Build Status](https://travis-ci.org/go-fsnotify/fsnotify.svg?branch=master)](https://travis-ci.org/go-fsnotify/fsnotify)|
 |kqueue    |BSD, OS X, iOS\*|Supported [![Build Status](https://travis-ci.org/go-fsnotify/fsnotify.svg?branch=master)](https://travis-ci.org/go-fsnotify/fsnotify)|
 |ReadDirectoryChangesW|Windows|Supported [![Build status](https://ci.appveyor.com/api/projects/status/ivwjubaih4r0udeh/branch/master?svg=true)](https://ci.appveyor.com/project/NathanYoungman/fsnotify/branch/master)|
 |FSEvents  |OS X          |[Planned](https://github.com/go-fsnotify/fsnotify/issues/11)|
index 3b4178404196ed7ec4151a5efb814308974aac21..23a5ca14600cad51bb629df8bec9cd9714cf152e 100644 (file)
@@ -39,7 +39,7 @@ func newFdPoller(fd int) (*fdPoller, error) {
        poller.fd = fd
 
        // Create epoll fd
-       poller.epfd, errno = syscall.EpollCreate(1)
+       poller.epfd, errno = syscall.EpollCreate1(0)
        if poller.epfd == -1 {
                return nil, errno
        }