chiark / gitweb /
syncthing: fix crash on Android 8 (#2391)
[termux-packages] / packages / syncthing / no_ioprioSet.patch
1 diff -uNr syncthing/lib/osutil/lowprio_linux.go syncthing.mod/lib/osutil/lowprio_linux.go
2 --- syncthing/lib/osutil/lowprio_linux.go       2018-03-06 08:19:07.000000000 +0200
3 +++ syncthing.mod/lib/osutil/lowprio_linux.go   2018-05-02 13:03:12.463566932 +0300
4 @@ -30,13 +30,8 @@
5  )
6  
7  func ioprioSet(class ioprioClass, value int) error {
8 -       res, _, err := syscall.Syscall(syscall.SYS_IOPRIO_SET,
9 -               uintptr(ioprioWhoProcess), 0,
10 -               uintptr(class)<<ioprioClassShift|uintptr(value))
11 -       if res == 0 {
12 -               return nil
13 -       }
14 -       return err
15 +    // Android 8 does not allow syscall SYS_IOPRIO_SET
16 +    return nil
17  }
18  
19  // SetLowPriority lowers the process CPU scheduling priority, and possibly