65cf7f8f19c17049f4a743b84d988dccf360568d
[packages/trusty/cirros-testvm.git] / cirros-testvm / src-cirros / buildroot-2015.05 / package / gd / 0002-no-zlib.patch
1 [PATCH] gd_gd2: provide dummy implementations for all public symbols when !zlib
2
3 gd_gd2.c only provides dummy implementations for some of it's public symbols
4 when zlib isn't found, causing build failures in several of the tools.
5
6 Fix it by providing dummy implementations for all of them.
7
8 Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
9 ---
10  gd_gd2.c |   30 ++++++++++++++++++++++++++++++
11  1 file changed, 30 insertions(+)
12
13 Index: gd-2.0.35/gd_gd2.c
14 ===================================================================
15 --- gd-2.0.35.orig/src/gd_gd2.c
16 +++ gd-2.0.35/src/gd_gd2.c
17 @@ -1068,4 +1068,34 @@
18    fprintf (stderr, "GD2 support is not available - no libz\n");
19    return NULL;
20  }
21 +
22 +BGD_DECLARE(gdImagePtr) gdImageCreateFromGd2Part (FILE * inFile, int srcx, int srcy, int w, int h)
23 +{
24 +  fprintf (stderr, "GD2 support is not available - no libz\n");
25 +  return NULL;
26 +}
27 +
28 +BGD_DECLARE(gdImagePtr) gdImageCreateFromGd2PartPtr (int size, void *data, int srcx, int srcy, int w,
29 +                            int h)
30 +{
31 +  fprintf (stderr, "GD2 support is not available - no libz\n");
32 +  return NULL;
33 +}
34 +
35 +BGD_DECLARE(gdImagePtr) gdImageCreateFromGd2PartCtx (gdIOCtx * in, int srcx, int srcy, int w, int h)
36 +{
37 +  fprintf (stderr, "GD2 support is not available - no libz\n");
38 +  return NULL;
39 +}
40 +
41 +BGD_DECLARE(void) gdImageGd2 (gdImagePtr im, FILE * outFile, int cs, int fmt)
42 +{
43 +  fprintf (stderr, "GD2 support is not available - no libz\n");
44 +}
45 +
46 +BGD_DECLARE(void *) gdImageGd2Ptr (gdImagePtr im, int cs, int fmt, int *size)
47 +{
48 +  fprintf (stderr, "GD2 support is not available - no libz\n");
49 +  return NULL;
50 +}
51  #endif /* HAVE_LIBZ */