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 569737 - gnome-panel-2.24.3: clock applet uses the daylight variable from time.h which is a non posix extension and causes build failures on FreeBSD
gnome-panel-2.24.3: clock applet uses the daylight variable from time.h which...
Status: RESOLVED FIXED
Product: gnome-panel
Classification: Other
Component: clock
2.24.x
Other All
: Normal normal
: ---
Assigned To: Panel Maintainers
Panel Maintainers
Depends on:
Blocks:
 
 
Reported: 2009-01-29 21:58 UTC by Alexis Ballier
Modified: 2009-08-11 18:50 UTC
See Also:
GNOME target: ---
GNOME version: 2.23/2.24


Attachments
proposed patch (912 bytes, patch)
2009-01-29 22:17 UTC, Alexis Ballier
committed Details | Review

Description Alexis Ballier 2009-01-29 21:58:36 UTC
Please describe the problem:
Build failure:

libtool: compile:  i686-gentoo-freebsd7.1-gcc -DHAVE_CONFIG_H -I. -I../.. -I./../../libpanel-applet -I../../libpanel-applet -Wall -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wno-sign-compare -D_THREAD_SAFE -DORBIT2=1 -pthread -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/include/libgnomeui-2.0 -I/usr/include/libart-2.0 -I/usr/include/gconf/2 -I/usr/include/gnome-keyring-1 -I/usr/include/libgnome-2.0 -I/usr/include/libbonoboui-2.0 -I/usr/include/libgnomecanvas-2.0 -I/usr/include/gnome-vfs-2.0 -I/usr/lib/gnome-vfs-2.0/include -I/usr/include/orbit-2.0 -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -I/usr/include/libbonobo-2.0 -I/usr/include/bonobo-activation-2.0 -I/usr/include/libxml2 -I/usr/include/gail-1.0 -I/usr/include/libglade-2.0 -I/usr/include/librsvg-2 -I/usr/include/libsoup-2.4 -DORBIT2=1 -pthread -D_THREAD_SAFE -I/usr/include/orbit-2.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/include/libgnomeui-2.0 -I/usr/include/libart-2.0 -I/usr/include/gconf/2 -I/usr/include/gnome-keyring-1 -I/usr/include/libgnome-2.0 -I/usr/include/libbonoboui-2.0 -I/usr/include/libgnomecanvas-2.0 -I/usr/include/gnome-vfs-2.0 -I/usr/lib/gnome-vfs-2.0/include -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -I/usr/include/libbonobo-2.0 -I/usr/include/bonobo-activation-2.0 -I/usr/include/libxml2 -I/usr/include/gail-1.0 -I/usr/include/libglade-2.0 -DDATADIR=\"/usr/share\" -DGLADEDIR=\"/usr/share/gnome-panel/glade\" -DICONDIR=\"/usr/share/gnome-panel/pixmaps\" -DLIBDIR=\"/usr/lib\" -DSYSCONFDIR=\"/etc\" -DPREFIX=\"/usr\" -DGNOMELOCALEDIR=\"/usr/share/locale\" -DCLOCK_EDS_ICONDIR=\"\" -DCLOCK_TIME_UTILITY=\"\" -DGWEATHER_I_KNOW_THIS_IS_UNSTABLE -march=athlon-xp -O2 -pipe -g -ggdb -MT libclock_applet_la-clock.lo -MD -MP -MF .deps/libclock_applet_la-clock.Tpo -c clock.c  -fPIC -DPIC -o .libs/libclock_applet_la-clock.o
clock.c: In function ‘update_tooltip’:
clock.c:656: error: ‘daylight’ undeclared (first use in this function)
clock.c:656: error: (Each undeclared identifier is reported only once
clock.c:656: error: for each function it appears in.)



According to http://www.opengroup.org/onlinepubs/9699919799/basedefs/time.h.html , daylight is an X/OPEN extension; unfortunataly it is not present on FreeBSD.

Steps to reproduce:
1. 
2. 
3. 


Actual results:


Expected results:


Does this happen every time?


Other information:
Comment 1 Alexis Ballier 2009-01-29 22:17:50 UTC
Created attachment 127500 [details] [review]
proposed patch

FreeBSD ports use a hack that defines daylight to 1;
According to what I understand of the time structures this proposed patch should preserve the behavior without using the daylight variable. Another option could be to check for daylight in configure and use it iff its available.
Comment 2 Rémi Cardona 2009-02-03 10:42:04 UTC
As a side note, here's a snippet from "man daylight" on linux :

Note  that  the  variable daylight does not indicate that daylight saving time applies right now. It used to give the number of some algorithm (see the variable  tz_dsttime  in  gettimeofday(2)). It has been obsolete for many years but is required by SUSv2.

Cheers
Comment 3 Vincent Untz 2009-08-11 18:50:22 UTC
Thanks for the patch!