X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=util%2Fzlib-extra.h;h=296dc91441be04e0c32fbacd7938819750930c9b;hp=209fa9989437d8cf77bf9ac60c739cb9fcb47a8f;hb=2c1f783f5f4ad28d89f2e83d7253bae7bba98440;hpb=d50f41c0fd0bbd2ca2b364f49deaea8be63dff3c diff --git a/util/zlib-extra.h b/util/zlib-extra.h index 209fa998..296dc914 100644 --- a/util/zlib-extra.h +++ b/util/zlib-extra.h @@ -27,6 +27,11 @@ gz_getline (void *ctx, char **lineptr, ssize_t *bytes_read, gzFile stream); const char * gz_error_string (util_status_t status, gzFile stream); +/* Call gzerror with a dummy errno argument, the docs don't promise to + * support the NULL case */ +inline const char * +gzerror_str(gzFile file) { int dummy; return gzerror (file, &dummy); } + #ifdef __cplusplus } #endif