diff --git a/src/IMG_avif.c b/src/IMG_avif.c index 63064ad8..2e89cd2e 100644 --- a/src/IMG_avif.c +++ b/src/IMG_avif.c @@ -84,11 +84,11 @@ static struct { if (lib.FUNC == NULL) { IMG_SetError("Missing avif.framework"); return -1; } #endif -int IMG_InitAVIF(void) #ifdef __APPLE__ /* Need to turn off optimizations so weak framework load check works */ __attribute__ ((optnone)) #endif +int IMG_InitAVIF(void) { if ( lib.loaded == 0 ) { #ifdef LOAD_AVIF_DYNAMIC diff --git a/src/IMG_jxl.c b/src/IMG_jxl.c index 3d7d1580..b9ef7170 100644 --- a/src/IMG_jxl.c +++ b/src/IMG_jxl.c @@ -52,11 +52,11 @@ static struct { if (lib.FUNC == NULL) { IMG_SetError("Missing jxl.framework"); return -1; } #endif -int IMG_InitJXL(void) #ifdef __APPLE__ /* Need to turn off optimizations so weak framework load check works */ __attribute__ ((optnone)) #endif +int IMG_InitJXL(void) { if ( lib.loaded == 0 ) { #ifdef LOAD_JXL_DYNAMIC