aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel/src/image.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2020-02-11 11:42:21 +0100
committerThomas White <taw@physics.org>2020-02-11 11:42:21 +0100
commita607da9373e4cbf8609fac477ef5ecd3323ca234 (patch)
treeb5e083ba61d76a714859a11e3318d71695b931e5 /libcrystfel/src/image.c
parent6f2ca6294851780290877c387ada86744bbbebc6 (diff)
Don't use gzbuffer if it's not available
Enables compatability with zlib < 1.2.3.5
Diffstat (limited to 'libcrystfel/src/image.c')
-rw-r--r--libcrystfel/src/image.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libcrystfel/src/image.c b/libcrystfel/src/image.c
index 9768e15d..6358a9d0 100644
--- a/libcrystfel/src/image.c
+++ b/libcrystfel/src/image.c
@@ -787,8 +787,10 @@ static float *read_cbf_data(struct imagefile *f, int *w, int *h)
gzfh = gzopen(f->filename, "rb");
if ( gzfh == NULL ) return NULL;
+ #ifdef HAVE_GZBUFFER
/* Set larger buffer size for hopefully faster uncompression */
gzbuffer(gzfh, 128*1024);
+ #endif
buf = malloc(bufsz);
if ( buf == NULL ) return NULL;