Skip to content

`siginterrupt` deprecation warning on build

When building xfce4-dict from source, I get the following deprecation warning during build concerning lib/dictd.c.

dictd.c: In function ‘dictd_init’:
dictd.c:674:17: warning: ‘siginterrupt’ is deprecated: Use sigaction with SA_RESTART instead [-Wdeprecated-declarations]
  674 |                 siginterrupt(SIGALRM, 1);
      |                 ^~~~~~~~~~~~
In file included from /usr/include/glib-2.0/glib/gbacktrace.h:36,
                 from /usr/include/glib-2.0/glib.h:34,
                 from /usr/include/gtk-3.0/gdk/gdkconfig.h:13,
                 from /usr/include/gtk-3.0/gdk/gdk.h:30,
                 from /usr/include/gtk-3.0/gtk/gtk.h:30,
                 from dictd.c:28:
/usr/include/signal.h:324:12: note: declared here
  324 | extern int siginterrupt (int __sig, int __interrupt) __THROW
      |            ^~~~~~~~~~~~

This occurs when building with glibc 2.34. It looks like the symbol has been deprecated since glibc 2.32 released on 2020-08-06. Would replacing this with an equivalent use of sigaction introduce a compatibility issue?