configure: Fix failing libpng and zlib detection
Since Apple clang version 12 implicit function declarations by default are (rightfully) an error resulting in failure to compile the configure tests for libpng and zlib, which make implicit use of exit. Fix by using return statements (another solution is including stdlib.h).
This commit is contained in:
parent
d2fc88c03d
commit
f6a43a6074
2 changed files with 8 additions and 8 deletions
8
configure
vendored
8
configure
vendored
|
|
@ -21547,13 +21547,13 @@ else
|
|||
int main()
|
||||
{
|
||||
FILE *f=fopen("conftestval", "w");
|
||||
if (!f) exit(1);
|
||||
if (!f) return 1;
|
||||
fprintf(f, "%s",
|
||||
ZLIB_VERSION[0] == '1' &&
|
||||
(ZLIB_VERSION[2] > '1' ||
|
||||
(ZLIB_VERSION[2] == '1' &&
|
||||
ZLIB_VERSION[4] >= '4')) ? "yes" : "no");
|
||||
exit(0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
_ACEOF
|
||||
|
|
@ -21686,10 +21686,10 @@ else
|
|||
int main()
|
||||
{
|
||||
FILE *f=fopen("conftestval", "w");
|
||||
if (!f) exit(1);
|
||||
if (!f) return 1;
|
||||
fprintf(f, "%s",
|
||||
PNG_LIBPNG_VER > 90 ? "yes" : "no");
|
||||
exit(0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
_ACEOF
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue