mirror of
https://github.com/golang/sys.git
synced 2026-02-08 11:46:04 +03:00
unix: fix difference Stat_t type and Statfs_t type per GOARCH on darwin
In darwin/arm64, has the libc_fstat{fs} trampoline, not libc_fstat{fs}64.
But types_darwin.go defined same C types.
Change-Id: Ia33c60029eb59360e421f42ef79efe890eba3e3e
Reviewed-on: https://go-review.googlesource.com/c/sys/+/357071
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Trust: Tobias Klauser <tobias.klauser@gmail.com>
This commit is contained in:
committed by
Tobias Klauser
parent
565ff80d9b
commit
b3129d9d10
@@ -74,6 +74,13 @@ struct sockaddr_any {
|
||||
char pad[sizeof(union sockaddr_all) - sizeof(struct sockaddr)];
|
||||
};
|
||||
|
||||
#if defined(__x86_64__)
|
||||
typedef struct stat64 stat_t;
|
||||
typedef struct statfs64 statfs_t;
|
||||
#else // __arm__
|
||||
typedef struct stat stat_t;
|
||||
typedef struct statfs statfs_t;
|
||||
#endif
|
||||
*/
|
||||
import "C"
|
||||
|
||||
@@ -114,9 +121,9 @@ type _Gid_t C.gid_t
|
||||
|
||||
// Files
|
||||
|
||||
type Stat_t C.struct_stat64
|
||||
type Stat_t C.stat_t
|
||||
|
||||
type Statfs_t C.struct_statfs64
|
||||
type Statfs_t C.statfs_t
|
||||
|
||||
type Flock_t C.struct_flock
|
||||
|
||||
|
||||
Reference in New Issue
Block a user