From 10290c3dd63ef98cb1291b0e7311673e67f31c8f Mon Sep 17 00:00:00 2001 From: John Cupitt Date: Wed, 16 Jan 2019 13:37:50 +0000 Subject: [PATCH] fix function name error on old glibs see https://github.com/libvips/libvips/pull/1211#discussion_r248280743 --- libvips/iofuncs/image.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libvips/iofuncs/image.c b/libvips/iofuncs/image.c index ad9f2f7b..7520f70b 100644 --- a/libvips/iofuncs/image.c +++ b/libvips/iofuncs/image.c @@ -1666,11 +1666,13 @@ vips_image_temp_name( char *name, int size ) { static int global_serial = 0; + /* Old glibs named this differently. + */ int serial = #if GLIB_CHECK_VERSION( 2, 30, 0 ) - g_atomic_int_add( &global_serial, 1); + g_atomic_int_add( &global_serial, 1 ); #else - g_atomic_exchange_and_add( &global_serial, 1); + g_atomic_int_exchange_and_add( &global_serial, 1 ); #endif vips_snprintf( name, size, "temp-%d", serial );