mirror of
https://github.com/rwinkhart/sys.git
synced 2026-08-30 05:46:45 -04:00
Add minimal support for GNU/Hurd to allow building third party packages which detect terminal support. Change-Id: Ia13fe8e9e4880e8ab062f9a2efb581320637f017 GitHub-Last-Rev: f612efbe7da35f618d1bd498a215f4b9da9c4f53 GitHub-Pull-Request: golang/sys#144 Reviewed-on: https://go-review.googlesource.com/c/sys/+/459895 Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com> Auto-Submit: Ian Lance Taylor <iant@google.com> Run-TryBot: Ian Lance Taylor <iant@google.com> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Reviewed-by: Ian Lance Taylor <iant@google.com> Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> TryBot-Result: Gopher Robot <gobot@golang.org>
24 lines
461 B
Go
24 lines
461 B
Go
// Copyright 2022 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.
|
|
|
|
//go:build hurd
|
|
// +build hurd
|
|
|
|
package unix
|
|
|
|
/*
|
|
#include <stdint.h>
|
|
int ioctl(int, unsigned long int, uintptr_t);
|
|
*/
|
|
import "C"
|
|
|
|
func ioctl(fd int, req uint, arg uintptr) (err error) {
|
|
r0, er := C.ioctl(C.int(fd), C.ulong(req), C.uintptr_t(arg))
|
|
if r0 == -1 && er != nil {
|
|
err = er
|
|
}
|
|
return
|
|
}
|
|
|