]> git.ipfire.org Git - thirdparty/collectd.git/commitdiff
strbuf: Use <stdbool.h> instead of _Bool.
authorFlorian Forster <octo@collectd.org>
Fri, 18 Sep 2020 19:32:15 +0000 (21:32 +0200)
committerFlorian Forster <octo@google.com>
Tue, 22 Sep 2020 09:05:42 +0000 (11:05 +0200)
C++, e.g. the gRPC plugin, cannot deal with _Bool.

src/utils/strbuf/strbuf.h

index 85664a295ed0bbd1e913edff199eb5e5fbc90e38..c3a95fae2b31d830786f5b7b28e73056c5f8940f 100644 (file)
 #ifndef UTILS_STRBUF_H
 #define UTILS_STRBUF_H 1
 
+#include <stdbool.h>
+
 typedef struct {
   char *ptr;
   size_t pos;
   size_t size;
-  _Bool fixed;
+  bool fixed;
 } strbuf_t;
 
 /* STRBUF_CREATE allocates a new strbuf_t on the stack, which must be freed