After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 620747 - Fails to build without X gamma extension
Fails to build without X gamma extension
Status: RESOLVED FIXED
Product: gnome-screensaver
Classification: Deprecated
Component: general
2.30.x
Other Linux
: Normal normal
: ---
Assigned To: gnome-screensaver maintainers
gnome-screensaver maintainers
Depends on:
Blocks:
 
 
Reported: 2010-06-06 14:07 UTC by Wouter Bolsterlee (uws)
Modified: 2010-06-21 19:25 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Bug 620747 — Fix build without X gamma extension (4.10 KB, patch)
2010-06-07 20:09 UTC, Wouter Bolsterlee (uws)
none Details | Review

Description Wouter Bolsterlee (uws) 2010-06-06 14:07:35 UTC
Gnome Screensaver refuses to compile if the X Gamma extension is not available (I forgot to install the header files beforehand, that's why I noticed):

make  all-am
make[1]: Entering directory `/home/uws/Projects/Gnome/Development/src/gnome-screensaver/src'
  CC     gs-fade.o
gs-fade.c: In function ‘check_gamma_extension’:
gs-fade.c:443: error: ‘screen_priv’ undeclared (first use in this function)
gs-fade.c:443: error: (Each undeclared identifier is reported only once
gs-fade.c:443: error: for each function it appears in.)
make[1]: *** [gs-fade.o] Error 1
make[1]: Leaving directory `/home/uws/Projects/Gnome/Development/src/gnome-screensaver/src'
make: *** [all] Error 2


This is due to the #ifdef guards not matching correctly:

static void
check_gamma_extension (GSFade *fade, int screen_idx)
{
#ifdef HAVE_XF86VMODE_GAMMA
        struct GSFadeScreenPrivate *screen_priv;
        [...]
#endif
        screen_priv->fade_type = FADE_TYPE_NONE;
}
Comment 1 Wouter Bolsterlee (uws) 2010-06-07 20:09:24 UTC
Created attachment 162969 [details] [review]
Bug 620747 — Fix build without X gamma extension 

Make sure the variable declarations are properly places inside the mess
of #ifdefs, and cleanup the code for the X Gamma extension checks while
we're at it: avoid a few gotos and conditionally define the functions
that are only used if the Gamma extension is available (this avoids
compiler warnings).
Comment 2 William Jon McCann 2010-06-21 19:25:26 UTC
Committed a similar patch without the cleanups.  Thanks.