1
0
mirror of https://github.com/golang/go synced 2024-10-05 10:31:22 -06:00
go/src/pkg/net/cgo_openbsd.go
Joel Sing 708db79011 cgo: enable cgo on openbsd
Enable cgo on OpenBSD.

The OpenBSD ld.so(1) does not currently support PT_TLS sections. Work
around this by fixing up the TCB that has been provided by librthread
and reallocating a TCB with additional space for TLS. Also provide a
wrapper for pthread_create, allowing zeroed TLS to be allocated for
threads created externally to Go.

Joint work with Shenghou Ma (minux).

Requires change 6846064.

Fixes #3205.

R=golang-dev, minux.ma, iant, rsc, iant
CC=golang-dev
https://golang.org/cl/6853059
2012-12-21 01:43:19 +11:00

15 lines
268 B
Go

// Copyright 2011 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 net
/*
#include <netdb.h>
*/
import "C"
func cgoAddrInfoFlags() C.int {
return C.AI_CANONNAME
}