Commit f86dbf2
committed
Auto merge of #2216 - Thomasdezeeuw:macos-gethostuuid, r=Amanieu
Add gethostuuid and uuid_t on macOS
This adds the `gethostuuid` function and the `uuid_t` for macOS.
I'm not sure the function signature is correct. It's defined as the following in C:
```C
int gethostuuid(uuid_t id, const struct timespec *wait);
typedef unsigned char __darwin_uuid_t[16];
typedef __darwin_uuid_t uuid_t;
```
Because C doesn't really has arrays, the accept parameter can't be `uuid_t` in Rust, as Rust does have arrays and thus expect an array to be passed by value, where the C function expects a pointer.2 files changed
+7
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
361 | 361 | | |
362 | 362 | | |
363 | 363 | | |
| 364 | + | |
| 365 | + | |
364 | 366 | | |
365 | 367 | | |
366 | 368 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
32 | 33 | | |
33 | 34 | | |
34 | 35 | | |
| |||
4098 | 4099 | | |
4099 | 4100 | | |
4100 | 4101 | | |
| 4102 | + | |
| 4103 | + | |
| 4104 | + | |
| 4105 | + | |
4101 | 4106 | | |
4102 | 4107 | | |
4103 | 4108 | | |
| |||
0 commit comments