Commit cbc3268d authored by Mikio Hara's avatar Mikio Hara

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
parent 4e7f765b
...@@ -20,9 +20,9 @@ enum E { ...@@ -20,9 +20,9 @@ enum E {
Enum2 = 2, 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; x[0] = 0;
} }
...@@ -65,7 +65,7 @@ const EINVAL = C.EINVAL /* test #define */ ...@@ -65,7 +65,7 @@ const EINVAL = C.EINVAL /* test #define */
var KILO = C.KILO var KILO = C.KILO
func uuidgen() { func uuidgen() {
var uuid C.uuid_t var uuid C.cgo_uuid_t
C.uuid_generate(&uuid[0]) C.uuid_generate(&uuid[0])
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment