mirror of
https://github.com/samba-team/samba.git
synced 2025-02-02 09:47:23 +03:00
async_sock: try fix the source4 build on FreeBSD, Solaris, SLES8
metze
This commit is contained in:
parent
9726e76028
commit
faabc97c9a
@ -21,12 +21,16 @@
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "includes.h"
|
||||
#include "lib/talloc/talloc.h"
|
||||
#include "lib/tevent/tevent.h"
|
||||
#include "replace.h"
|
||||
#include "system/network.h"
|
||||
#include "system/filesys.h"
|
||||
#include <talloc.h>
|
||||
#include <tevent.h>
|
||||
#include "lib/async_req/async_sock.h"
|
||||
|
||||
/* Note: lib/util/ is currently GPL */
|
||||
#include "lib/util/tevent_unix.h"
|
||||
#include <fcntl.h>
|
||||
#include "lib/util/util.h"
|
||||
|
||||
#ifndef TALLOC_FREE
|
||||
#define TALLOC_FREE(ctx) do { talloc_free(ctx); ctx=NULL; } while(0)
|
||||
|
@ -24,7 +24,8 @@
|
||||
#ifndef __ASYNC_SOCK_H__
|
||||
#define __ASYNC_SOCK_H__
|
||||
|
||||
#include "includes.h"
|
||||
#include <talloc.h>
|
||||
#include <tevent.h>
|
||||
|
||||
struct tevent_req *async_send_send(TALLOC_CTX *mem_ctx,
|
||||
struct tevent_context *ev,
|
||||
|
@ -1,4 +1,4 @@
|
||||
[SUBSYSTEM::LIBASYNC_REQ]
|
||||
PUBLIC_DEPENDENCIES = LIBREPLACE_NETWORK
|
||||
PUBLIC_DEPENDENCIES = LIBREPLACE_NETWORK LIBTALLOC LIBTEVENT
|
||||
|
||||
LIBASYNC_REQ_OBJ_FILES = $(addprefix ../lib/async_req/, async_sock.o)
|
||||
|
@ -28,18 +28,14 @@
|
||||
#include "system/network.h"
|
||||
#include <talloc.h>
|
||||
#include <tevent.h>
|
||||
struct fd_event;
|
||||
struct event_context;
|
||||
#include "lib/async_req/async_sock.h"
|
||||
#include "lib/util/tevent_unix.h"
|
||||
#include "nsswitch/winbind_struct_protocol.h"
|
||||
#include "nsswitch/libwbclient/wbclient.h"
|
||||
#include "nsswitch/libwbclient/wbc_async.h"
|
||||
|
||||
#ifdef DBGC_CLASS
|
||||
#undef DBGC_CLASS
|
||||
#define DBGC_CLASS DBGC_WINBIND
|
||||
#endif
|
||||
/* can't use DEBUG here... */
|
||||
#define DEBUG(a,b)
|
||||
|
||||
struct req_read_state {
|
||||
struct winbindd_request *wb_req;
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user