server: O_WRONLY is not unix only
@@ -10,7 +10,6 @@ import (
"github.com/kubernetes-incubator/cri-o/oci"
"github.com/sirupsen/logrus"
"golang.org/x/net/context"
- "golang.org/x/sys/unix"
pb "k8s.io/kubernetes/pkg/kubelet/apis/cri/runtime/v1alpha2"
)
@@ -40,7 +39,7 @@ func (s *Server) ReopenContainerLog(ctx context.Context, req *pb.ReopenContainer
}
controlPath := filepath.Join(c.BundlePath(), "ctl")
- controlFile, err := os.OpenFile(controlPath, unix.O_WRONLY, 0)
+ controlFile, err := os.OpenFile(controlPath, os.O_WRONLY, 0)
if err != nil {
return nil, fmt.Errorf("failed to open container ctl file: %v", err)
}
