[oe-commits] Florian Boor : lxpanel: Fix conflicting declaration

git at git.openembedded.org git at git.openembedded.org
Thu Sep 27 14:39:02 UTC 2012


Module: openembedded.git
Branch: master
Commit: 81f219481725230788fbc2e1a1494eabeee0648d
URL:    http://git.openembedded.org/?p=openembedded.git&a=commit;h=81f219481725230788fbc2e1a1494eabeee0648d

Author: Florian Boor <florian at kernelconcepts.de>
Date:   Tue Jan 25 09:58:07 2011 +0100

lxpanel: Fix conflicting declaration

    Add patch to version 0.5.5 fixing a compile issue caused by duplicated declaration.

Signed-off-by: Florian Boor <florian.boor at kernelconcepts.de>

---

 recipes/lxde/lxpanel/alarm_typedef_conflict.patch |  138 +++++++++++++++++++++
 recipes/lxde/lxpanel_0.5.5.bb                     |    4 +-
 2 files changed, 141 insertions(+), 1 deletions(-)

diff --git a/recipes/lxde/lxpanel/alarm_typedef_conflict.patch b/recipes/lxde/lxpanel/alarm_typedef_conflict.patch
new file mode 100644
index 0000000..b578888
--- /dev/null
+++ b/recipes/lxde/lxpanel/alarm_typedef_conflict.patch
@@ -0,0 +1,138 @@
+=== modified file 'src/plugins/batt/batt.c'
+--- src/plugins/batt/batt.c	2010-11-04 03:31:44 +0000
++++ src/plugins/batt/batt.c	2010-11-04 03:33:54 +0000
+@@ -89,21 +89,21 @@
+     sem_t alarmProcessLock;
+     battery* b;
+     gboolean has_ac_adapter;
+-} lx_battery;
++} lx_battery_t;
+ 
+ 
+ typedef struct {
+     char *command;
+     sem_t *lock;
+-} alarm;
++} lx_battery_alarm_t;
+ 
+ static void destructor(Plugin *p);
+-static void update_display(lx_battery *lx_b, gboolean repaint);
++static void update_display(lx_battery_t *lx_b, gboolean repaint);
+ 
+ /* 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_battery_alarm_t *a = (lx_battery_alarm_t *) arg;
+ 
+     sem_wait(a->lock);
+     system(a->command);
+@@ -116,7 +116,7 @@
+ 
+ /* FIXME:
+    Don't repaint if percentage of remaining charge and remaining time aren't changed. */
+-void update_display(lx_battery *lx_b, gboolean repaint) {
++void update_display(lx_battery_t *lx_b, gboolean repaint) {
+     char tooltip[ 256 ];
+     battery *b = lx_b->b;
+     /* unit: mW */
+@@ -157,7 +157,7 @@
+ 	/* Run the alarm command if it isn't already running */
+ 	if (alarmCanRun) {
+ 	    
+-	    alarm *a = (alarm *) malloc(sizeof(alarm));
++	    lx_battery_alarm_t *a = (lx_battery_alarm_t *) malloc(sizeof(lx_battery_alarm_t));
+ 	    a->command = lx_b->alarmCommand;
+ 	    a->lock = &(lx_b->alarmProcessLock);
+ 	    
+@@ -241,7 +241,7 @@
+ }
+ 
+ /* This callback is called every 3 seconds */
+-static int update_timout(lx_battery *lx_b) {
++static int update_timout(lx_battery_t *lx_b) {
+     GDK_THREADS_ENTER();
+     lx_b->state_elapsed_time++;
+     lx_b->info_elapsed_time++;
+@@ -259,7 +259,7 @@
+ static gint buttonPressEvent(GtkWidget *widget, GdkEventButton *event,
+         Plugin* plugin) {
+ 
+-    lx_battery *lx_b = (lx_battery*)plugin->priv;
++    lx_battery_t *lx_b = (lx_battery_t*)plugin->priv;
+ 
+     update_display(lx_b, TRUE);
+ 
+@@ -274,7 +274,7 @@
+ 
+ 
+ static gint configureEvent(GtkWidget *widget, GdkEventConfigure *event,
+-        lx_battery *lx_b) {
++        lx_battery_t *lx_b) {
+ 
+     ENTER;
+ 
+@@ -304,7 +304,7 @@
+ }
+ 
+ 
+-static gint exposeEvent(GtkWidget *widget, GdkEventExpose *event, lx_battery *lx_b) {
++static gint exposeEvent(GtkWidget *widget, GdkEventExpose *event, lx_battery_t *lx_b) {
+ 
+     ENTER;
+ 
+@@ -322,8 +322,8 @@
+ {
+     ENTER;
+ 
+-    lx_battery *lx_b;
+-    p->priv = lx_b = g_new0(lx_battery, 1);
++    lx_battery_t *lx_b;
++    p->priv = lx_b = g_new0(lx_battery_t, 1);
+ 
+     /* get available battery */
+     lx_b->b = battery_get ();
+@@ -480,7 +480,7 @@
+ {
+     ENTER;
+ 
+-    lx_battery *b = (lx_battery *) p->priv;
++    lx_battery_t *b = (lx_battery_t *) p->priv;
+ 
+     if (b->pixmap)
+         g_object_unref(b->pixmap);
+@@ -511,7 +511,7 @@
+ 
+     ENTER;
+ 
+-    lx_battery *b = (lx_battery *) p->priv;
++    lx_battery_t *b = (lx_battery_t *) p->priv;
+ 
+     if (b->orientation != p->panel->orientation) {
+         b->orientation = p->panel->orientation;
+@@ -529,7 +529,7 @@
+ {
+     ENTER;
+ 
+-    lx_battery *b = (lx_battery *) p->priv;
++    lx_battery_t *b = (lx_battery_t *) p->priv;
+ 
+     /* Update colors */
+     if (b->backgroundColor &&
+@@ -572,7 +572,7 @@
+     ENTER;
+ 
+     GtkWidget *dialog;
+-    lx_battery *b = (lx_battery *) p->priv;
++    lx_battery_t *b = (lx_battery_t *) p->priv;
+     dialog = create_generic_config_dlg(_(p->class->name),
+             GTK_WIDGET(parent),
+             (GSourceFunc) applyConfig, (gpointer) p,
+@@ -596,7 +596,7 @@
+ 
+ 
+ static void save(Plugin* p, FILE* fp) {
+-    lx_battery *lx_b = (lx_battery *) p->priv;
++    lx_battery_t *lx_b = (lx_battery_t *) p->priv;
+ 
+     lxpanel_put_bool(fp, "HideIfNoBa
\ No newline at end of file
diff --git a/recipes/lxde/lxpanel_0.5.5.bb b/recipes/lxde/lxpanel_0.5.5.bb
index e3747ae..2d1df89 100644
--- a/recipes/lxde/lxpanel_0.5.5.bb
+++ b/recipes/lxde/lxpanel_0.5.5.bb
@@ -1,8 +1,10 @@
 DESCRIPTION = "LXDE Panel"
 SECTION = "x11"
 DEPENDS = "menu-cache"
+PR = "r1"
 
-SRC_URI = "${SOURCEFORGE_MIRROR}/lxde/${PN}-${PV}.tar.gz"
+SRC_URI = "${SOURCEFORGE_MIRROR}/lxde/${PN}-${PV}.tar.gz \
+           file://alarm_typedef_conflict.patch;striplevel=0"
 
 SRC_URI[md5sum] = "6162b7e8d912a41f9c075fe982370bfb"
 SRC_URI[sha256sum] = "729c3dc52e343fe15dfde40475875c2b3670b3b37958c6c1e4c936242cdc2e9b"





More information about the Openembedded-commits mailing list