1*4882a593SmuzhiyunFrom 1ae5ff981ae0484383c4733c56b72e56a3a37584 Mon Sep 17 00:00:00 2001 2*4882a593SmuzhiyunFrom: Fabrice Fontaine <fontaine.fabrice@gmail.com> 3*4882a593SmuzhiyunDate: Sat, 14 Aug 2021 10:43:13 +0200 4*4882a593SmuzhiyunSubject: [PATCH] glib/poppler-private.h: fix build with gcc 11 5*4882a593Smuzhiyun 6*4882a593SmuzhiyunFix the following build failure with gcc 11: 7*4882a593Smuzhiyun 8*4882a593SmuzhiyunIn file included from /tmp/instance-0/output-1/host/arm-buildroot-linux-gnueabihf/sysroot/usr/include/glib-2.0/glib/gthread.h:32, 9*4882a593Smuzhiyun from /tmp/instance-0/output-1/host/arm-buildroot-linux-gnueabihf/sysroot/usr/include/glib-2.0/glib/gasyncqueue.h:32, 10*4882a593Smuzhiyun from /tmp/instance-0/output-1/host/arm-buildroot-linux-gnueabihf/sysroot/usr/include/glib-2.0/glib.h:32, 11*4882a593Smuzhiyun from /tmp/instance-0/output-1/host/arm-buildroot-linux-gnueabihf/sysroot/usr/include/glib-2.0/gobject/gbinding.h:28, 12*4882a593Smuzhiyun from /tmp/instance-0/output-1/host/arm-buildroot-linux-gnueabihf/sysroot/usr/include/glib-2.0/glib-object.h:22, 13*4882a593Smuzhiyun from /tmp/instance-0/output-1/build/poppler-0.84.0/glib/poppler.h:22, 14*4882a593Smuzhiyun from /tmp/instance-0/output-1/build/poppler-0.84.0/glib/poppler-action.cc:19: 15*4882a593Smuzhiyun/tmp/instance-0/output-1/build/poppler-0.84.0/glib/poppler-action.cc: In function 'GType poppler_dest_get_type()': 16*4882a593Smuzhiyun/tmp/instance-0/output-1/build/poppler-0.84.0/glib/poppler-private.h:155:13: error: argument 2 of '__atomic_load' must not be a pointer to a 'volatile' type 17*4882a593Smuzhiyun 155 | if (g_once_init_enter (&g_define_type_id__volatile)) { \ 18*4882a593Smuzhiyun | ^~~~~~~~~~~~~~~~~ 19*4882a593Smuzhiyun/tmp/instance-0/output-1/build/poppler-0.84.0/glib/poppler-action.cc:28:1: note: in expansion of macro 'POPPLER_DEFINE_BOXED_TYPE' 20*4882a593Smuzhiyun 28 | POPPLER_DEFINE_BOXED_TYPE (PopplerDest, poppler_dest, poppler_dest_copy, poppler_dest_free) 21*4882a593Smuzhiyun | ^~~~~~~~~~~~~~~~~~~~~~~~~ 22*4882a593Smuzhiyun 23*4882a593SmuzhiyunFixes: 24*4882a593Smuzhiyun - http://autobuild.buildroot.org/results/dfcaac6487aaeb10412c3fe72a23135f8a70fefe 25*4882a593Smuzhiyun 26*4882a593SmuzhiyunSigned-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> 27*4882a593Smuzhiyun[Upstream status: not needed because of 28*4882a593Smuzhiyunhttps://gitlab.freedesktop.org/poppler/poppler/-/commit/47de887d7658cfd68df44b3acf710971054f957b] 29*4882a593Smuzhiyun--- 30*4882a593Smuzhiyun glib/poppler-private.h | 2 +- 31*4882a593Smuzhiyun 1 file changed, 1 insertion(+), 1 deletion(-) 32*4882a593Smuzhiyun 33*4882a593Smuzhiyundiff --git a/glib/poppler-private.h b/glib/poppler-private.h 34*4882a593Smuzhiyunindex 86b587fd..ff15eab0 100644 35*4882a593Smuzhiyun--- a/glib/poppler-private.h 36*4882a593Smuzhiyun+++ b/glib/poppler-private.h 37*4882a593Smuzhiyun@@ -152,7 +152,7 @@ gboolean _poppler_convert_pdf_date_to_gtime (const GooString *date, 38*4882a593Smuzhiyun GType \ 39*4882a593Smuzhiyun type_name##_get_type (void) \ 40*4882a593Smuzhiyun { \ 41*4882a593Smuzhiyun- static volatile gsize g_define_type_id__volatile = 0; \ 42*4882a593Smuzhiyun+ static gsize g_define_type_id__volatile = 0; \ 43*4882a593Smuzhiyun if (g_once_init_enter (&g_define_type_id__volatile)) { \ 44*4882a593Smuzhiyun GType g_define_type_id = \ 45*4882a593Smuzhiyun g_boxed_type_register_static (g_intern_static_string (#TypeName), \ 46*4882a593Smuzhiyun-- 47*4882a593Smuzhiyun2.30.2 48*4882a593Smuzhiyun 49