This commit is contained in:
xushiwei
2024-07-12 01:17:00 +08:00
parent 452ee7a103
commit 2cf92037e9
2 changed files with 3 additions and 71 deletions

View File

@@ -7,7 +7,6 @@
package syscall
import (
"errors"
"unsafe"
"github.com/goplus/llgo/c"
@@ -35,8 +34,9 @@ func (e Errno) Is(target error) bool {
return e == EEXIST || e == ENOTEMPTY
case oserror.ErrNotExist:
return e == ENOENT
case errors.ErrUnsupported:
return e == ENOSYS || e == ENOTSUP || e == EOPNOTSUPP
// TODO(xsw): go1.21
// case errors.ErrUnsupported:
// return e == ENOSYS || e == ENOTSUP || e == EOPNOTSUPP
}
return false
}