return 0;
/* up to the end of bcs->d[] */
- csummed_size = offsetof(typeof(*bcs), d) +
+ csummed_size = offsetof(__typeof__(*bcs), d) +
sizeof(bcs->d[0]) * le16_to_cpu(bcs->keys);
csummed = blkid_probe_get_sb_buffer(pr, mag, csummed_size);
csum = ul_crc64_we(csummed + BCACHE_SB_CSUMMED_START,
uint64_t sectors = 0;
uint8_t i;
- if (BYTES(field) != offsetof(typeof(*members), members[bcs->nr_devices]))
+ if (BYTES(field) != offsetof(__typeof__(*members), members[bcs->nr_devices]))
return;
blkid_probe_set_uuid_as(pr, members->members[dev_idx].uuid, "UUID_SUB");
struct bcachefs_sb_field_disk_groups *disk_groups =
(struct bcachefs_sb_field_disk_groups *) field;
- if (BYTES(field) != offsetof(typeof(*disk_groups), disk_groups[bcs->nr_devices]))
+ if (BYTES(field) != offsetof(__typeof__(*disk_groups), disk_groups[bcs->nr_devices]))
return;
blkid_probe_set_id_label(pr, "LABEL_SUB",
uint32_t expected = le32_to_cpu(sb->s_crc);
uint32_t crc = ul_crc32_exclude_offset(
~0LL, (unsigned char *) sb, sizeof(*sb),
- offsetof(typeof(*sb), s_crc), sizeof(sb->s_crc));
+ offsetof(__typeof__(*sb), s_crc), sizeof(sb->s_crc));
return blkid_probe_verify_csum(pr, crc, expected);
}