diff --git a/addressbook/libedata-book/e-data-book-factory.c b/addressbook/libedata-book/e-data-book-factory.c
index d0a4546..f53ddf8 100644
--- a/addressbook/libedata-book/e-data-book-factory.c
+++ b/addressbook/libedata-book/e-data-book-factory.c
@@ -844,7 +844,11 @@ main (gint argc, gchar **argv)
 	e_data_book_migrate_basedir ();
 
 #ifdef G_OS_UNIX
-#if GLIB_CHECK_VERSION(2,29,5)
+#if GLIB_CHECK_VERSION(2,29,19)
+	g_unix_signal_add_full (
+		G_PRIORITY_DEFAULT, SIGTERM,
+		handle_term_signal, NULL, NULL);
+#elif GLIB_CHECK_VERSION(2,29,5)
 	g_unix_signal_add_watch_full (
 		SIGTERM, G_PRIORITY_DEFAULT,
 		handle_term_signal, NULL, NULL);
diff --git a/calendar/libedata-cal/e-data-cal-factory.c b/calendar/libedata-cal/e-data-cal-factory.c
index 32771e1..d1f63b4 100644
--- a/calendar/libedata-cal/e-data-cal-factory.c
+++ b/calendar/libedata-cal/e-data-cal-factory.c
@@ -1070,7 +1070,11 @@ main (gint argc, gchar **argv)
 	e_data_cal_migrate_basedir ();
 
 #ifdef G_OS_UNIX
-#if GLIB_CHECK_VERSION(2,29,5)
+#if GLIB_CHECK_VERSION(2,29,19)
+	g_unix_signal_add_full (
+		G_PRIORITY_DEFAULT, SIGTERM,
+		handle_term_signal, NULL, NULL);
+#elif GLIB_CHECK_VERSION(2,29,5)
 	g_unix_signal_add_watch_full (
 		SIGTERM, G_PRIORITY_DEFAULT,
 		handle_term_signal, NULL, NULL);
