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