Browse Source

Compile fixes for glib 2.12

git.mgm/mediaproxy-ng/2.0
Richard Fuchs 15 years ago
parent
commit
f609d6921e
3 changed files with 18 additions and 1 deletions
  1. +1
    -1
      daemon/Makefile
  2. +15
    -0
      daemon/aux.c
  3. +2
    -0
      daemon/aux.h

+ 1
- 1
daemon/Makefile View File

@ -3,7 +3,7 @@ REDIS=yes
LIBREDISDIR= libhiredis-v0.10.0-3-gdf203bc
CC= gcc
CFLAGS= -g -Wall `pkg-config --cflags glib-2.0` `pcre-config --cflags`
CFLAGS= -g -Wall `pkg-config --cflags glib-2.0` `pcre-config --cflags` -fno-strict-aliasing
CFLAGS+= -I/lib/modules/`uname -r`/build/include/ -I../kernel-module/
CFLAGS+= -D_GNU_SOURCE
CFLAGS+= -O2


+ 15
- 0
daemon/aux.c View File

@ -157,4 +157,19 @@ void g_string_vprintf(GString *string, const gchar *format, va_list args) {
free(s);
}
void g_queue_clear(GQueue *q) {
GList *l, *n;
if (!q)
return;
for (l = q->head; l; l = n) {
n = l->next;
g_list_free_1(l);
}
q->head = q->tail = NULL;
q->length = 0;
}
#endif

+ 2
- 0
daemon/aux.h View File

@ -45,7 +45,9 @@ void strdupfree(char **, const char *);
#if !GLIB_CHECK_VERSION(2,14,0)
#define G_QUEUE_INIT { NULL, NULL, 0 }
void g_string_vprintf(GString *string, const gchar *format, va_list args);
void g_queue_clear(GQueue *);
#endif


Loading…
Cancel
Save