]> git.sur5r.net Git - i3/i3/commitdiff
yajl compatibility: forgot add_subscription (Thanks badboy)
authorMichael Stapelberg <michael@stapelberg.de>
Thu, 28 Apr 2011 18:25:57 +0000 (20:25 +0200)
committerMichael Stapelberg <michael@stapelberg.de>
Thu, 28 Apr 2011 18:26:18 +0000 (20:26 +0200)
src/ipc.c

index d2f0def01f6f93d198ed7300c9eea93ce082d1d1..3b4bb524b29e1b1f7e5df1673782250ff5140fd9 100644 (file)
--- a/src/ipc.c
+++ b/src/ipc.c
@@ -304,8 +304,13 @@ IPC_HANDLER(get_outputs) {
  * Callback for the YAJL parser (will be called when a string is parsed).
  *
  */
+#if YAJL_MAJOR >= 2
+static int add_subscription(void *extra, const unsigned char *s,
+                            size_t len) {
+#else
 static int add_subscription(void *extra, const unsigned char *s,
                             unsigned int len) {
+#endif
         ipc_client *client = extra;
 
         DLOG("should add subscription to extra %p, sub %.*s\n", client, len, s);