async_sock: try fix the source4 build on FreeBSD, Solaris, SLES8
[ira/wip.git] / nsswitch / libwbclient / wbc_async.c
index 5f985f9d5acc7266a5af59841887551b75a543bc..fb8d8b102d494091bc0b8d384a9cf405a033c9af 100644 (file)
@@ -26,8 +26,6 @@
 #include "system/network.h"
 #include <talloc.h>
 #include <tevent.h>
-struct fd_event;
-struct event_context;
 #include "lib/async_req/async_sock.h"
 #include "nsswitch/winbind_struct_protocol.h"
 #include "nsswitch/libwbclient/wbclient.h"
@@ -254,7 +252,7 @@ static struct tevent_req *wb_connect_send(TALLOC_CTX *mem_ctx,
 
        /* Connect to socket */
 
-       path = talloc_asprintf(talloc_tos(), "%s/%s", dir,
+       path = talloc_asprintf(mem_ctx, "%s/%s", dir,
                               WINBINDD_SOCKET_NAME);
        if (path == NULL) {
                goto nomem;
@@ -613,7 +611,7 @@ static bool wb_trans_retry(struct tevent_req *req,
        }
 
        subreq = tevent_wakeup_send(state, state->ev,
-                                   timeval_current_ofs(1, 0));
+                                   tevent_timeval_current_ofs(1, 0));
        if (tevent_req_nomem(subreq, req)) {
                return true;
        }