mirror of
https://github.com/golang/go
synced 2024-11-22 04:24:39 -07:00
misc/cgo/test: fix darwin build
uuid_t is defined in unistd.h on OS X, unfortunately. R=iant, rsc CC=golang-dev https://golang.org/cl/6455057
This commit is contained in:
parent
4e7f765b12
commit
cbc3268d1d
@ -20,9 +20,9 @@ enum E {
|
||||
Enum2 = 2,
|
||||
};
|
||||
|
||||
typedef unsigned char uuid_t[20];
|
||||
typedef unsigned char cgo_uuid_t[20];
|
||||
|
||||
void uuid_generate(uuid_t x) {
|
||||
void uuid_generate(cgo_uuid_t x) {
|
||||
x[0] = 0;
|
||||
}
|
||||
|
||||
@ -65,7 +65,7 @@ const EINVAL = C.EINVAL /* test #define */
|
||||
var KILO = C.KILO
|
||||
|
||||
func uuidgen() {
|
||||
var uuid C.uuid_t
|
||||
var uuid C.cgo_uuid_t
|
||||
C.uuid_generate(&uuid[0])
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user