From 3e240396307df095e90887a5a307a5ee5862ebf4 Mon Sep 17 00:00:00 2001 From: Riku Voipio Date: Mon, 2 Nov 2015 21:39:13 +0200 Subject: [PATCH] inotify: switch to epoll_create1 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 | 4 ++++ README.md | 2 +- inotify_poller.go | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b0bfea0..83c226a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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) diff --git a/README.md b/README.md index 736c0d2..f2b432e 100644 --- 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)| diff --git a/inotify_poller.go b/inotify_poller.go index 3b41784..23a5ca1 100644 --- a/inotify_poller.go +++ b/inotify_poller.go @@ -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 } -- 2.50.1