Subject: bug#74606: 31.0.50; Another rsvg API change

From: Osama Rebach <[email-masked]>
Date: Mon, 02 Dec 2024 12:58:01 +0100

rsvg_handle_get_pixbuf_and_error is defined in librsvg 2.59, so the patch
should guard against 2.59 instead of 2.58

I have libsrvg 2.58.3 and get this error:

image.c: In function 'svg_load_image':
image.c:12376:12: warning: implicit declaration of function 'rsvg_handle_get_pixbuf_and_error'; did you mean 'rsvg_handle_get_pixbuf_sub'? [8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wimplicit-function-declaration-Wimplicit-function-declaration8;;]
12376 |   pixbuf = rsvg_handle_get_pixbuf_and_error (rsvg_handle, &err);
      |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |            rsvg_handle_get_pixbuf_sub
image.c:12376:10: warning: assignment to 'GdkPixbuf *' {aka 'struct _GdkPixbuf *'} from 'int' makes pointer from integer without a cast [8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wint-conversion-Wint-conversion8;;]
12376 |   pixbuf = rsvg_handle_get_pixbuf_and_error (rsvg_handle, &err);
      |          ^
  CC       lastfile.o
  CCLD     temacs
  GEN      ../etc/DOC
/nix/store/va7kw1i822h95im4jacci19v0cqajfyf-binutils-2.43.1/bin/ld: image.o: in function `svg_load_image':
image.c:(.text+0x7a89): undefined reference to `rsvg_handle_get_pixbuf_and_error'
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:745: temacs] Error 1
make[2]: Leaving directory '/build/source/src'
make[1]: *** [Makefile:554: src] Error 2
make[1]: Leaving directory '/build/source'
make[1]: Entering directory '/build/source'
***
*** "make all" failed with exit status 2.
***
*** You could try to:
*** - run "make bootstrap", which might fix the problem
*** - run "make V=1", which displays the full commands invoked by make,
***   to further investigate the problem
***
make[1]: *** [Makefile:418: advice-on-failure] Error 2
make[1]: Leaving directory '/build/source'
make: *** [Makefile:374: all] Error 2