Bug#777882: Patch for GCC 5 build issue

2015-07-18 Thread gregor herrmann
On Tue, 07 Jul 2015 18:04:47 +, Pearson, Greg wrote:

 Here's a fix for the GCC 5 build issue.  I added extern to the callable
 copy of the inline functions to ensure an externally visible function is
 emitted, please see section Different semantics for inline functions
 at https://gcc.gnu.org/gcc-5/porting_to.html for more background.

I can confirm that this patch fixes the GCC 5 build failure; but with
it the build in unstable (i.e. with GCC 4.9) fails:

xgnokii-xgnokii.o: In function `CreateAboutDialog':
/tmp/buildd/gnokii-0.6.30+dfsg/xgnokii/xgnokii.c:1187: undefined reference to 
`GUI_HideAbout'
xgnokii-xgnokii_logos.o:(.data+0x1c0): undefined reference to `CloseLogosWindow'
collect2: error: ld returned 1 exit status
Makefile:486: recipe for target 'xgnokii' failed


Cheers,
gregor

-- 
 .''`.  Homepage: http://info.comodo.priv.at/ - OpenPGP key 0xBB3A68018649AA06
 : :' : Debian GNU/Linux user, admin, and developer -  https://www.debian.org/
 `. `'  Member of VIBE!AT  SPI, fellow of the Free Software Foundation Europe
   `-   NP: Bettina Wegner: Sie hat's gewusst


signature.asc
Description: Digital Signature


Bug#777882: Patch for GCC 5 build issue

2015-07-07 Thread Pearson, Greg
tags 777882 + patch
thanks

Here's a fix for the GCC 5 build issue.  I added extern to the callable
copy of the inline functions to ensure an externally visible function is
emitted, please see section Different semantics for inline functions
at https://gcc.gnu.org/gcc-5/porting_to.html for more background.

--
Greg Pearson
Linux for HP Helion
--- a/xgnokii/xgnokii.c	2015-07-07 17:58:16.285881332 +
+++ b/xgnokii/xgnokii.c	2015-07-07 18:03:19.661891930 +
@@ -798,7 +798,7 @@
 }
 
 
-inline void GUI_HideAbout(void)
+extern inline void GUI_HideAbout(void)
 {
 	gtk_widget_hide(AboutDialog);
 }
diff -urN a/xgnokii/xgnokii_logos.c b/xgnokii/xgnokii_logos.c
--- a/xgnokii/xgnokii_logos.c	2015-07-07 17:58:40.145882166 +
+++ b/xgnokii/xgnokii_logos.c	2015-07-07 18:03:13.349891709 +
@@ -1303,7 +1303,7 @@
 	return 0;
 }
 
-inline void CloseLogosWindow(void)
+extern inline void CloseLogosWindow(void)
 {
 	gtk_widget_hide(GUI_LogosWindow);
 }