Skip to content

Commit 3b27b0f

Browse files
author
Ilia Alshanetsky
committed
Fixed a bug that prevented building of gd extension against external GD
lib 1.X.
1 parent 2680fb4 commit 3b27b0f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

ext/gd/gd.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1720,6 +1720,7 @@ static void _php_image_output(INTERNAL_FUNCTION_PARAMETERS, int image_type, char
17201720
}
17211721

17221722
switch (image_type) {
1723+
#ifdef HAVE_GD_WBMP
17231724
case PHP_GDIMG_CONVERT_WBM:
17241725
if (q == -1) {
17251726
q = 0;
@@ -1729,6 +1730,7 @@ static void _php_image_output(INTERNAL_FUNCTION_PARAMETERS, int image_type, char
17291730
}
17301731
gdImageWBMP(im, q, fp);
17311732
break;
1733+
#endif
17321734
case PHP_GDIMG_TYPE_JPG:
17331735
(*func_p)(im, fp, q);
17341736
break;
@@ -1767,6 +1769,7 @@ static void _php_image_output(INTERNAL_FUNCTION_PARAMETERS, int image_type, char
17671769
}
17681770

17691771
switch (image_type) {
1772+
#ifdef HAVE_GD_WBMP
17701773
case PHP_GDIMG_CONVERT_WBM:
17711774
if (q == -1) {
17721775
q = 0;
@@ -1776,6 +1779,7 @@ static void _php_image_output(INTERNAL_FUNCTION_PARAMETERS, int image_type, char
17761779
}
17771780
gdImageWBMP(im, q, tmp);
17781781
break;
1782+
#endif
17791783
case PHP_GDIMG_TYPE_JPG:
17801784
(*func_p)(im, tmp, q);
17811785
break;

0 commit comments

Comments
 (0)