aboutsummaryrefslogtreecommitdiffstats
path: root/x11
diff options
context:
space:
mode:
authorkmoore <kmoore@FreeBSD.org>2010-11-26 22:44:00 +0800
committerkmoore <kmoore@FreeBSD.org>2010-11-26 22:44:00 +0800
commitdb197575826748f338e5198783c7b885e42928b7 (patch)
tree4d135c0d959dcd155b979287adb951c0b66943f4 /x11
parent9f5bf5b4bb690b4fa6016dd472324f4ace7104b2 (diff)
downloadfreebsd-ports-gnome-db197575826748f338e5198783c7b885e42928b7.tar.gz
freebsd-ports-gnome-db197575826748f338e5198783c7b885e42928b7.tar.zst
freebsd-ports-gnome-db197575826748f338e5198783c7b885e42928b7.zip
Fixed building on CURRENT / broken alarm definition.
Diffstat (limited to 'x11')
-rw-r--r--x11/lxpanel/files/patch-src__plugins__batt__batt.c31
1 files changed, 29 insertions, 2 deletions
diff --git a/x11/lxpanel/files/patch-src__plugins__batt__batt.c b/x11/lxpanel/files/patch-src__plugins__batt__batt.c
index 95b2bc8df9d4..f94f9f493fa3 100644
--- a/x11/lxpanel/files/patch-src__plugins__batt__batt.c
+++ b/x11/lxpanel/files/patch-src__plugins__batt__batt.c
@@ -1,5 +1,5 @@
---- src/plugins/batt/batt.c.orig 2010-02-08 07:37:52.000000000 +0100
-+++ src/plugins/batt/batt.c 2010-10-16 19:33:35.871250014 +0200
+--- src/plugins/batt/batt.c.orig 2010-02-08 06:37:52.000000000 +0000
++++ src/plugins/batt/batt.c 2010-11-26 14:33:21.000000000 +0000
@@ -30,7 +30,7 @@
*/
@@ -18,6 +18,24 @@
border,
height,
length,
+@@ -95,7 +95,7 @@
+ typedef struct {
+ char *command;
+ sem_t *lock;
+-} alarm;
++} lx_alarm;
+
+ static void destructor(Plugin *p);
+ static void update_display(lx_battery *lx_b, gboolean repaint);
+@@ -103,7 +103,7 @@
+ /* alarmProcess takes the address of a dynamically allocated alarm struct (which
+ it must free). It ensures that alarm commands do not run concurrently. */
+ static void * alarmProcess(void *arg) {
+- alarm *a = (alarm *) arg;
++ lx_alarm *a = (lx_alarm *) arg;
+
+ sem_wait(a->lock);
+ system(a->command);
@@ -120,21 +120,18 @@
char tooltip[ 256 ];
battery *b = lx_b->b;
@@ -53,6 +71,15 @@
{
/* Shrug this should be done using glibs process functions */
/* Alarms should not run concurrently; determine whether an alarm is
+@@ -157,7 +154,7 @@
+ /* Run the alarm command if it isn't already running */
+ if (alarmCanRun) {
+
+- alarm *a = (alarm *) malloc(sizeof(alarm));
++ lx_alarm *a = (lx_alarm *) malloc(sizeof(alarm));
+ a->command = lx_b->alarmCommand;
+ a->lock = &(lx_b->alarmProcessLock);
+
@@ -176,7 +173,7 @@
int left_seconds = b->seconds -= 3600 * hours;
int minutes = left_seconds / 60;