[gnome-sudoku] Link with pthreads
- From: Ernestas Kulik <ernestask src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-sudoku] Link with pthreads
- Date: Wed, 29 Nov 2017 16:21:13 +0000 (UTC)
commit ec20e8433b84e0aee9f51518a18b79780082cf5e
Author: Ernestas Kulik <ernestask gnome org>
Date: Wed Nov 29 14:12:32 2017 +0200
Link with pthreads
Calling std::call_once() from the C++11 thread support library without having
linked to a pthread library will result in an unhandled exception when
generating puzzles.
https://bugzilla.gnome.org/show_bug.cgi?id=790981
configure.ac | 2 ++
lib/Makefile.am | 5 +++++
2 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 9f6042c..4b119f8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -54,6 +54,8 @@ PKG_CHECK_MODULES(LIBSUDOKU, [
AC_SUBST([GLIB_REQUIRED])
+AX_PTHREAD
+
AC_PATH_PROG([DESKTOP_FILE_VALIDATE], [desktop-file-validate], [/bin/true])
AC_CHECK_LIB([m],[floor])
diff --git a/lib/Makefile.am b/lib/Makefile.am
index b994bb4..5cd65fa 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -17,7 +17,12 @@ libsudoku_la_CPPFLAGS = \
-DGETTEXT_PACKAGE=\"$(GETTEXT_PACKAGE)\" \
$(LIBSUDOKU_CFLAGS)
+# C++11 thread support library needs pthreads to work properly.
+libsudoku_la_CXXFLAGS = \
+ $(PTHREAD_CFLAGS)
+
libsudoku_la_LIBADD = \
+ $(PTHREAD_LIBS) \
$(LIBSUDOKU_LIBS)
libsudoku_la_VALAFLAGS = \
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]