Dear Maintainer, I found now another way to get it working by removing the intermediate function my_setjmp, like in attached patch.
It looks like the compiler needs to be aware of the setjmp. Before this patch, I tried defining my_setjmp with attribute returns_twice, but that was not enough. Kind regards, Bernhard
Description: Replace my_setjmp by original setjmp Author: Bernhard Übelacker <bernha...@mailbox.org> Bug-Debian: https://bugs.debian.org/992871 Forwarded: no Last-Update: 2021-09-18 Index: darkplaces-0~20180908~beta1/image_png.c =================================================================== --- darkplaces-0~20180908~beta1.orig/image_png.c +++ darkplaces-0~20180908~beta1/image_png.c @@ -36,16 +36,6 @@ // implementations of setjmp()/longjmp() (it either does or doesn't save the // signal mask), acting on different definitions of the jmp_buf struct. # include <png.h> - -// libpng calls longjmp() internally, and expects its callers to call the -// version of setjmp() corresponding to the longjmp() call that libpng would -// make. Set this up before including any other headers that might -// change which flavour of setjmp() we get. -static inline int -my_setjmp (jmp_buf env) -{ - return setjmp (env); -} #endif #include "quakedef.h" @@ -54,7 +44,7 @@ my_setjmp (jmp_buf env) #ifdef LINK_TO_PNG -#define qpng_setjmp(png) my_setjmp (png_jmpbuf (png)) +#define qpng_setjmp(png) (setjmp (png_jmpbuf (png))) #define qpng_set_sig_bytes png_set_sig_bytes #define qpng_sig_cmp png_sig_cmp