Found this while running ctags(1)... vioqcow2.c has struct qcheader already defined at L53 (which stylistically is where it should be).
This diff just removes the duplicate definition inside virtio_qcow2_create(). OK? Index: vioqcow2.c =================================================================== RCS file: /cvs/src/usr.sbin/vmd/vioqcow2.c,v retrieving revision 1.14 diff -u -p -r1.14 vioqcow2.c --- vioqcow2.c 19 Oct 2020 19:06:49 -0000 1.14 +++ vioqcow2.c 29 Apr 2021 19:17:11 -0000 @@ -634,27 +634,7 @@ int virtio_qcow2_create(const char *imgfile_path, const char *base_path, long imgsize) { - struct qcheader { - char magic[4]; - uint32_t version; - uint64_t backingoff; - uint32_t backingsz; - uint32_t clustershift; - uint64_t disksz; - uint32_t cryptmethod; - uint32_t l1sz; - uint64_t l1off; - uint64_t refoff; - uint32_t refsz; - uint32_t snapcount; - uint64_t snapsz; - /* v3 additions */ - uint64_t incompatfeatures; - uint64_t compatfeatures; - uint64_t autoclearfeatures; - uint32_t reforder; - uint32_t headersz; - } __packed hdr, basehdr; + struct qcheader hdr, basehdr; int fd, ret; ssize_t base_len; uint64_t l1sz, refsz, disksz, initsz, clustersz;