1
0
mirror of https://github.com/golang/go synced 2024-11-21 22:24:40 -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:
Mikio Hara 2012-07-31 20:59:06 +09:00
parent 4e7f765b12
commit cbc3268d1d

View File

@ -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])
}