[glib/glib-2-58: 1/3] grefcount: add missing gatomic.h
- From: Simon McVittie <smcv src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib/glib-2-58: 1/3] grefcount: add missing gatomic.h
- Date: Tue, 23 Oct 2018 10:06:15 +0000 (UTC)
commit 57efb14f0519e0b20a789c274db7777f16c98b35
Author: Fabrice Fontaine <fontaine fabrice gmail com>
Date: Sat Oct 13 23:10:33 2018 +0200
grefcount: add missing gatomic.h
Without gatomic.h, build fails on:
In file included from garcbox.c:24:0:
garcbox.c: In function ‘g_atomic_rc_box_acquire’:
grefcount.h:101:13: error: implicit declaration of function ‘g_atomic_int_get’; did you mean
‘__atomic_store’? [-Werror=implicit-function-declaration]
(void) (g_atomic_int_get (rc) == G_MAXINT ? 0 : g_atomic_int_inc ((rc))); \
^
garcbox.c:292:3: note: in expansion of macro ‘g_atomic_ref_count_inc’
g_atomic_ref_count_inc (&real_box->ref_count);
Signed-off-by: Fabrice Fontaine <fontaine fabrice gmail com>
glib/grefcount.h | 1 +
1 file changed, 1 insertion(+)
---
diff --git a/glib/grefcount.h b/glib/grefcount.h
index dec9a5ffb..b6eced1b7 100644
--- a/glib/grefcount.h
+++ b/glib/grefcount.h
@@ -23,6 +23,7 @@
#error "Only <glib.h> can be included directly."
#endif
+#include <glib/gatomic.h>
#include <glib/gtypes.h>
G_BEGIN_DECLS
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]