Fix build for older glib
o9000 mrovi9000@gmail.com
3 files changed,
24 insertions(+),
0 deletions(-)
M
src/util/area.c
→
src/util/area.c
@@ -29,6 +29,7 @@
#include "area.h" #include "server.h" #include "panel.h" +#include "common.h" Area *mouse_over_area = NULL;
M
src/util/common.c
→
src/util/common.c
@@ -605,3 +605,18 @@ cairo_destroy(c);
cairo_surface_destroy(cs); XFreePixmap(server.dsp, pmap); } + +#if !GLIB_CHECK_VERSION (2, 33, 4) +GList *g_list_copy_deep(GList *list, GCopyFunc func, gpointer user_data) +{ + list = g_list_copy(list); + + if (func) { + for (GList *l = list; l; l = l->next) { + l->data = func(l->data, user_data); + } + } + + return list; +} +#endif
M
src/util/common.h
→
src/util/common.h
@@ -100,4 +100,12 @@ void clear_pixmap(Pixmap p, int x, int y, int w, int h);
#define free_and_null(p) { free(p); p = NULL; } +#if !GLIB_CHECK_VERSION (2, 33, 4) +GList *g_list_copy_deep(GList *list, GCopyFunc func, gpointer user_data); +#endif + +#if !GLIB_CHECK_VERSION (2, 38, 0) +#define g_assert_null(expr) g_assert((expr) == NULL) +#endif + #endif