On Mon, Aug 16, 2021 at 08:16:58PM +0000, Han-Wen Nienhuys via GitGitGadget wrote: > From: Han-Wen Nienhuys <hanwen@xxxxxxxxxx> ... > + union { > + struct { > + uint8_t *new_hash; > + uint8_t *old_hash; > + char *name; > + char *email; > + uint64_t time; > + int16_t tz_offset; > + char *message; > + } update; > + }; the use of an anonymous union here (which requires C11) could be made C89 compatible without any impact AFAIK by doing instead: diff --git a/reftable/reftable-record.h b/reftable/reftable-record.h index 7985b94ae2..136ff24910 100644 --- a/reftable/reftable-record.h +++ b/reftable/reftable-record.h @@ -84,17 +84,15 @@ struct reftable_log_record { #define REFTABLE_NR_LOG_VALUETYPES 2 } value_type; - union { - struct { - uint8_t *new_hash; - uint8_t *old_hash; - char *name; - char *email; - uint64_t time; - int16_t tz_offset; - char *message; - } update; - }; + struct { + uint8_t *new_hash; + uint8_t *old_hash; + char *name; + char *email; + uint64_t time; + int16_t tz_offset; + char *message; + } update; }; /* returns whether 'ref' represents the deletion of a log record. */