RDK-41842 : libloader-app do_compile error

Reason for change: Added required changes to make it work with latest version of gcc (11.3) supported in kirkstone.
Test Procedure: Ensure the build error is resolved
Risks: Medium

Signed-off-by: Sushant Daspute <sushant_daspute@comcast.com>
Change-Id: Id6a16aa54929a7c6225d4fa35035fd52f9ae426f
diff --git a/src/third_party/starboard/rdk/shared/player/player_internal.cc b/src/third_party/starboard/rdk/shared/player/player_internal.cc
index 79074cb..7da3cc7 100644
--- a/src/third_party/starboard/rdk/shared/player/player_internal.cc
+++ b/src/third_party/starboard/rdk/shared/player/player_internal.cc
@@ -116,7 +116,11 @@
 
 bool enableNativeAudio() {
   static bool enable_native_audio = false;
+#if __GNUC__ < 10
   static volatile gsize init = 0;
+#else
+  static gsize init = 0;
+#endif
 
   if (g_once_init_enter (&init)) {
     GstElementFactory* factory = gst_element_factory_find("brcmaudiosink");
@@ -903,7 +907,12 @@
 
 static GstElement* CreatePayloader() {
   static GstElementFactory* factory = nullptr;
+#if __GNUC__ < 10
   static volatile gsize init = 0;
+#else
+  static gsize init = 0;
+#endif
+
 
   if (g_once_init_enter (&init)) {
     factory = gst_element_factory_find("svppay");