X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fnetifd.git;a=blobdiff_plain;f=ubus.c;h=c47f459be47a50ebb1cd143ed592f9820417cb40;hp=c9b10e8d7b43a577dc612468600baaecb958d9ff;hb=b314737e9a0f0df710ba5e8691882cd7d42faaf5;hpb=ab98d23a5c70c77fce399a95741644a894d0905a diff --git a/ubus.c b/ubus.c index c9b10e8..c47f459 100644 --- a/ubus.c +++ b/ubus.c @@ -1,4 +1,7 @@ +#define _GNU_SOURCE + #include +#include #include "netifd.h" #include "interface.h" @@ -8,6 +11,7 @@ static struct ubus_context *ctx = NULL; static struct blob_buf b; +static struct netifd_fd ubus_fd; /* global object */ @@ -102,6 +106,8 @@ netifd_ubus_init(const char *path) DPRINTF("connected as %08x\n", ctx->local_id); uloop_init(); ubus_add_uloop(ctx); + ubus_fd.fd = ctx->sock.fd; + netifd_fd_add(&ubus_fd); ret = ubus_add_object(ctx, &main_object); if (ret)