github.com/ncw/directio doesn't support OpenBSD, but OpenBSD has syscall.Fsync. (It also has fdatasync: https://man.openbsd.org/fdatasync but apparently Golang can't call it).