From dd987f004301f6a737fcd431a9ae14d2fc2675bf Mon Sep 17 00:00:00 2001 From: Nick Alcock Date: Tue, 2 Jun 2020 20:39:15 +0100 Subject: [PATCH] libctf, create: empty dicts are dirty to start with Without this, an empty dict that is written out immediately never gets any content at all: even the header is left empty. libctf/ * ctf-create.c (ctf_create): Mark dirty. --- libctf/ChangeLog | 4 ++++ libctf/ctf-create.c | 1 + 2 files changed, 5 insertions(+) diff --git a/libctf/ChangeLog b/libctf/ChangeLog index 671df685421..0aee504f3e1 100644 --- a/libctf/ChangeLog +++ b/libctf/ChangeLog @@ -1,3 +1,7 @@ +2020-07-22 Nick Alcock + + * ctf-create.c (ctf_create): Mark dirty. + 2020-07-22 Nick Alcock * ctf-create.c (membcmp) Skip nameless members. diff --git a/libctf/ctf-create.c b/libctf/ctf-create.c index 5cbcfe0a702..1416d187fd9 100644 --- a/libctf/ctf-create.c +++ b/libctf/ctf-create.c @@ -126,6 +126,7 @@ ctf_create (int *errp) fp->ctf_dtoldid = 0; fp->ctf_snapshots = 1; fp->ctf_snapshot_lu = 0; + fp->ctf_flags |= LCTF_DIRTY; ctf_set_ctl_hashes (fp); ctf_setmodel (fp, CTF_MODEL_NATIVE); -- 2.30.2