Package: matchbox-panel Severity: minor Usertags: clang-ftbfs User: [email protected] Tag: patch
Hello, Using the rebuild infrastructure, your package fails to build with clang (instead of gcc). Thanks, Arthur
1diff -Naur matchbox-panel.orig/matchbox-panel-0.9.3/debian/changelog matchbox-panel/matchbox-panel-0.9.3/debian/changelog --- matchbox-panel.orig/matchbox-panel-0.9.3/debian/changelog 2014-06-05 17:00:01.380010875 -0500 +++ matchbox-panel/matchbox-panel-0.9.3/debian/changelog 2014-06-06 16:35:43.731594331 -0500 @@ -1,3 +1,11 @@ +matchbox-panel (0.9.3-8.2) unstable; urgency=low + + * Fix FTBFS with clang: + - Fixed "function declaration not allowed" error in: + applets/mb-applet-battery.c + + -- Arthur Marble <[email protected]> Fri, 06 Jun 2014 16:35:43 -0500 + matchbox-panel (0.9.3-8.1) unstable; urgency=low * Non-maintainer upload. diff -Naur matchbox-panel.orig/matchbox-panel-0.9.3/debian/patches/clang-ftbfs.diff matchbox-panel/matchbox-panel-0.9.3/debian/patches/clang-ftbfs.diff --- matchbox-panel.orig/matchbox-panel-0.9.3/debian/patches/clang-ftbfs.diff 1969-12-31 18:00:00.000000000 -0600 +++ matchbox-panel/matchbox-panel-0.9.3/debian/patches/clang-ftbfs.diff 2014-06-06 16:36:37.079595260 -0500 @@ -0,0 +1,82 @@ +--- a/applets/mb-applet-battery.c ++++ b/applets/mb-applet-battery.c +@@ -157,18 +157,42 @@ struct avg_consumption { + + static struct avg_consumption a; + ++struct entry { ++ char *key; ++ char *value; ++ char *unit; ++}; ++ ++static int ++line_parse(char *line, struct entry *e) ++{ ++ char *ptr; ++ ++ ptr = strchr(line, ':'); ++ if (!ptr) ++ return -1; ++ e->key = line; ++ *ptr = 0; ++ while (*++ptr && *ptr == ' '); ++ e->value = ptr; ++ while (*++ptr && *ptr != '\n' && *ptr != ' '); ++ *ptr = 0; ++ if (*++ptr) { ++ e->unit = ptr; ++ while (*++ptr && *ptr != '\n'); ++ *ptr = 0; ++ } else ++ e->unit = 0; ++ ++ return 0; ++} ++ + static int + read_apm(int *values) + { + enum ac_state { AC_UNKNOWN = -1, AC_OFFLINE = 0, AC_ONLINE = 1 }; + enum bat_state { BAT_UNKNOWN = -1, BAT_CHARGING = 1, BAT_DISCHARGING = 2 }; + +- struct entry { +- char *key; +- char *value; +- char *unit; +- }; +- + struct acpi_status { + enum ac_state ac_state; + enum bat_state bat_state; +@@ -177,30 +201,6 @@ read_apm(int *values) + unsigned long present_rate; + }; + +- int +- line_parse(char *line, struct entry *e) +- { +- char *ptr; +- +- ptr = strchr(line, ':'); +- if (!ptr) +- return -1; +- e->key = line; +- *ptr = 0; +- while (*++ptr && *ptr == ' '); +- e->value = ptr; +- while (*++ptr && *ptr != '\n' && *ptr != ' '); +- *ptr = 0; +- if (*++ptr) { +- e->unit = ptr; +- while (*++ptr && *ptr != '\n'); +- *ptr = 0; +- } else +- e->unit = 0; +- +- return 0; +- } +- + FILE *f; + char line[1024]; + struct entry e; diff -Naur matchbox-panel.orig/matchbox-panel-0.9.3/debian/patches/series matchbox-panel/matchbox-panel-0.9.3/debian/patches/series --- matchbox-panel.orig/matchbox-panel-0.9.3/debian/patches/series 2014-06-05 17:00:01.380010875 -0500 +++ matchbox-panel/matchbox-panel-0.9.3/debian/patches/series 2014-06-05 17:00:19.612011192 -0500 @@ -7,3 +7,4 @@ enable-png mb-applet-wireless-patch linking-fix +clang-ftbfs.diff

