From bdb9c358705eb894cfce7bb6dd1b37c425f5d32c Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Wed, 5 Aug 2009 11:47:02 -0400 Subject: Fix broken ifndefs ifndef doesn't work for those functions that aren't already macro definitions in tevent.h like tevent_req_data. However if tevent_req_data is defined in tevent.h, all other functions are available as well. So just check for tevent_req_data and define all of them if it is not available. This should fix compiling on distros with the latsest tevent. --- server/util/util.h | 9 --------- 1 file changed, 9 deletions(-) (limited to 'server/util/util.h') diff --git a/server/util/util.h b/server/util/util.h index c4e3e49db..e11bc51cf 100644 --- a/server/util/util.h +++ b/server/util/util.h @@ -84,18 +84,9 @@ void debug_fn(const char *format, ...); * should be used as tevent_req is rightfully opaque there */ #ifndef tevent_req_data #define tevent_req_data(req, type) ((type *)req->private_state) -#endif - -#ifndef tevent_req_set_callback #define tevent_req_set_callback(req, func, data) \ do { req->async.fn = func; req->async.private_data = data; } while(0) -#endif - -#ifndef tevent_req_callback_data #define tevent_req_callback_data(req, type) ((type *)req->async.private_data) -#endif - -#ifndef tevent_req_notify_callback #define tevent_req_notify_callback(req) \ do { \ if (req->async.fn != NULL) { \ -- cgit