fix function name error on old glibs
see https://github.com/libvips/libvips/pull/1211#discussion_r248280743
This commit is contained in:
parent
00982f6297
commit
10290c3dd6
|
@ -1666,11 +1666,13 @@ vips_image_temp_name( char *name, int size )
|
||||||
{
|
{
|
||||||
static int global_serial = 0;
|
static int global_serial = 0;
|
||||||
|
|
||||||
|
/* Old glibs named this differently.
|
||||||
|
*/
|
||||||
int serial =
|
int serial =
|
||||||
#if GLIB_CHECK_VERSION( 2, 30, 0 )
|
#if GLIB_CHECK_VERSION( 2, 30, 0 )
|
||||||
g_atomic_int_add( &global_serial, 1);
|
g_atomic_int_add( &global_serial, 1 );
|
||||||
#else
|
#else
|
||||||
g_atomic_exchange_and_add( &global_serial, 1);
|
g_atomic_int_exchange_and_add( &global_serial, 1 );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
vips_snprintf( name, size, "temp-%d", serial );
|
vips_snprintf( name, size, "temp-%d", serial );
|
||||||
|
|
Loading…
Reference in New Issue