summaryrefslogtreecommitdiff
path: root/x11/gnomepanel/files/patch-applets::gen_util::clock.c
diff options
context:
space:
mode:
authorMaxim Sobolev <sobomax@FreeBSD.org>2002-05-14 14:32:33 +0000
committerMaxim Sobolev <sobomax@FreeBSD.org>2002-05-14 14:32:33 +0000
commit5c588543ac25c7b39339f17a43069e9b9e6d72b1 (patch)
tree848181e651dd610fbdd54b328ccc8283cec00c06 /x11/gnomepanel/files/patch-applets::gen_util::clock.c
parentOops, last commit was an old version, this one is at least able to link (diff)
Fix on systems without langinfo.h header.
Submitted by: bento
Diffstat (limited to 'x11/gnomepanel/files/patch-applets::gen_util::clock.c')
-rw-r--r--x11/gnomepanel/files/patch-applets::gen_util::clock.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/x11/gnomepanel/files/patch-applets::gen_util::clock.c b/x11/gnomepanel/files/patch-applets::gen_util::clock.c
new file mode 100644
index 000000000000..96f5d3f44c48
--- /dev/null
+++ b/x11/gnomepanel/files/patch-applets::gen_util::clock.c
@@ -0,0 +1,27 @@
+
+$FreeBSD$
+
+--- applets/gen_util/clock.c 2002/05/14 14:08:16 1.1
++++ applets/gen_util/clock.c 2002/05/14 14:12:56
+@@ -14,7 +14,9 @@
+ #include <dirent.h>
+ #include <string.h>
+ #include <time.h>
++#ifdef HAVE_LANGINFO_H
+ #include <langinfo.h>
++#endif
+
+ #include <panel-applet.h>
+ #include <panel-applet-gconf.h>
+@@ -684,7 +686,11 @@
+ cd->hourformat = panel_applet_gconf_get_int (applet, KEY_HOUR_FORMAT, &error);
+ if (error || (cd->hourformat != 12 && cd->hourformat != 24)) {
+ /* if value is not valid, set it according to locale */
++#ifdef HAVE_LANGINFO_H
+ const char *am = nl_langinfo (AM_STR);
++#else
++ const char *am = "AM";
++#endif
+ cd->hourformat = (am[0] == '\0') ? 24 : 12;
+
+ if (error)