ssh/terminal: add support for zos

Fixes golang/go#42496

Change-Id: Iae2ddb916904d9b3947bec9638c9fbf892df7b7c
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/269177
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
Trust: Tobias Klauser <tobias.klauser@gmail.com>
Trust: Michael Munday <mike.munday@ibm.com>
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
diff --git a/ssh/terminal/util.go b/ssh/terminal/util.go
index 3911040..73b370a 100644
--- a/ssh/terminal/util.go
+++ b/ssh/terminal/util.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build aix darwin dragonfly freebsd linux,!appengine netbsd openbsd
+// +build aix darwin dragonfly freebsd linux,!appengine netbsd openbsd zos
 
 // Package terminal provides support functions for dealing with terminals, as
 // commonly found on UNIX systems.
diff --git a/ssh/terminal/util_zos.go b/ssh/terminal/util_zos.go
new file mode 100644
index 0000000..8314a2d
--- /dev/null
+++ b/ssh/terminal/util_zos.go
@@ -0,0 +1,10 @@
+// Copyright 2020 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package terminal
+
+import "golang.org/x/sys/unix"
+
+const ioctlReadTermios = unix.TCGETS
+const ioctlWriteTermios = unix.TCSETS