diff options
author | Jorgen Lundman <[email protected]> | 2020-06-17 03:57:04 +0900 |
---|---|---|
committer | GitHub <[email protected]> | 2020-06-16 11:57:04 -0700 |
commit | cd07d7c83f83f8b7aed655ea20ab08f6f660a3bb (patch) | |
tree | c2193005776aebfbe82e0950f8a57dfcebc47e63 | |
parent | 86a0f4948363cc196d1ad6de9ba8685999bf8cdd (diff) |
drr_begin: can't forward declare untagged struct
When compiling with Clang++ it does not allow for untagged structs, so
struct ddr_begin needs to be declared before the struct that uses it.
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Jorgen Lundman <[email protected]>
Closes #10453
-rw-r--r-- | include/sys/zfs_ioctl.h | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/include/sys/zfs_ioctl.h b/include/sys/zfs_ioctl.h index 100158b94..bfaf81038 100644 --- a/include/sys/zfs_ioctl.h +++ b/include/sys/zfs_ioctl.h @@ -224,6 +224,19 @@ typedef enum dmu_send_resume_token_version { /* * zfs ioctl command structure */ + +/* Header is used in C++ so can't forward declare untagged struct */ +struct drr_begin { + uint64_t drr_magic; + uint64_t drr_versioninfo; /* was drr_version */ + uint64_t drr_creation_time; + dmu_objset_type_t drr_type; + uint32_t drr_flags; + uint64_t drr_toguid; + uint64_t drr_fromguid; + char drr_toname[MAXNAMELEN]; +}; + typedef struct dmu_replay_record { enum { DRR_BEGIN, DRR_OBJECT, DRR_FREEOBJECTS, @@ -233,16 +246,7 @@ typedef struct dmu_replay_record { } drr_type; uint32_t drr_payloadlen; union { - struct drr_begin { - uint64_t drr_magic; - uint64_t drr_versioninfo; /* was drr_version */ - uint64_t drr_creation_time; - dmu_objset_type_t drr_type; - uint32_t drr_flags; - uint64_t drr_toguid; - uint64_t drr_fromguid; - char drr_toname[MAXNAMELEN]; - } drr_begin; + struct drr_begin drr_begin; struct drr_end { zio_cksum_t drr_checksum; uint64_t drr_toguid; |