Repository: syncthing/syncthing (language: go)

Issue:
Disable missing syscall on android-amd64, support AVD 12+ and Chromebook arch x86_64
### Purpose

Without this PR, "libsyncthing.so" (SyncthingNative) crashes with "bad syscall error".
ref: https://github.com/Catfriend1/syncthing-android/issues/583#issuecomment-1341022101

Affected: Both Syncthing(Android) and Syncthing-Fork (for Android). The missing syscall is called by "unix.EpollWait" from the god module "github.com/syncthing/notify". "unix.EpollWait" is part of "golang.org/x/sys". Upgrading "golang.org/x/sys" to the most recent version 0.3.0 doesn't solve the problem. So I've made this PR. 

Issue: https://github.com/syncthing/syncthing-android/issues/1703

### Testing

Verified on Android AVD 13. The disabled syscall (unix.epollwait) which isn't available on android-amd64 arch allows SyncthingNative to run without the file watcher. Platforms using this arch are for example: Android emulator >= 12, Google Chromebook. The arch is also labeled "x86_64" in app/src/jniLibs.

### Screenshots

![image](https://user-images.githubusercontent.com/16361913/206311703-5634df78-115a-41e8-b25e-243f04f52b81.png)

### Documentation

ref: https://github.com/Catfriend1/syncthing-android/issues/583

Please go light on me, I don't know much about the go stuff and appreciate any help on this. My main goal isn't dealing with the affected go lib or syscall stuff but I really need my Android emulator be able to execute the Syncthing Android app to continue my work on newer API levels and Android releases 12+.

## Authorship

Catfriend1




Discussion / hints:

Fix patch:
diff --git a/lib/fs/basicfs_watch.go b/lib/fs/basicfs_watch.go
index d26f83ed03b..83aea94e785 100644
--- a/lib/fs/basicfs_watch.go
+++ b/lib/fs/basicfs_watch.go
@@ -4,8 +4,10 @@
 // License, v. 2.0. If a copy of the MPL was not distributed with this file,
 // You can obtain one at http://mozilla.org/MPL/2.0/.
 
-//go:build (!solaris && !darwin) || (solaris && cgo) || (darwin && cgo)
-// +build !solaris,!darwin solaris,cgo darwin,cgo
+//go:build !(solaris && !cgo) && !(darwin && !cgo) && !(android && amd64)
+// +build !solaris cgo
+// +build !darwin cgo
+// +build !android !amd64
 
 package fs
 
diff --git a/lib/fs/basicfs_watch_unsupported.go b/lib/fs/basicfs_watch_unsupported.go
index 753eb68137c..fa4ab80da90 100644
--- a/lib/fs/basicfs_watch_unsupported.go
+++ b/lib/fs/basicfs_watch_unsupported.go
@@ -4,8 +4,8 @@
 // License, v. 2.0. If a copy of the MPL was not distributed with this file,
 // You can obtain one at http://mozilla.org/MPL/2.0/.
 
-//go:build (solaris && !cgo) || (darwin && !cgo)
-// +build solaris,!cgo darwin,!cgo
+//go:build (solaris && !cgo) || (darwin && !cgo) || (android && amd64)
+// +build solaris,!cgo darwin,!cgo android,amd64
 
 package fs
 


Test patch: