summaryrefslogtreecommitdiff
path: root/source4/lib/ldb
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib/ldb')
-rw-r--r--source4/lib/ldb/common/ldb_alloc.c4
-rw-r--r--source4/lib/ldb/include/ldb.h4
2 files changed, 4 insertions, 4 deletions
diff --git a/source4/lib/ldb/common/ldb_alloc.c b/source4/lib/ldb/common/ldb_alloc.c
index 6abd6fa8c3..0053c5e73f 100644
--- a/source4/lib/ldb/common/ldb_alloc.c
+++ b/source4/lib/ldb/common/ldb_alloc.c
@@ -39,7 +39,7 @@
this allows the user to choose their own allocation function
*/
int ldb_set_alloc(struct ldb_context *ldb,
- void *(*alloc)(void *context, void *ptr, size_t size),
+ void *(*alloc)(const void *context, void *ptr, size_t size),
void *context)
{
ldb->alloc_ops.alloc = alloc;
@@ -50,7 +50,7 @@ int ldb_set_alloc(struct ldb_context *ldb,
/*
this is the default memory allocation function
*/
-static void *ldb_default_alloc(void *context, void *ptr, size_t size)
+static void *ldb_default_alloc(const void *context, void *ptr, size_t size)
{
/* by setting LDB_ALLOC_OFS to non-zero the test suite can
catch any places where we incorrectly use the libc alloc
diff --git a/source4/lib/ldb/include/ldb.h b/source4/lib/ldb/include/ldb.h
index 241f186991..4b1401f673 100644
--- a/source4/lib/ldb/include/ldb.h
+++ b/source4/lib/ldb/include/ldb.h
@@ -145,7 +145,7 @@ struct ldb_backend_ops {
for pool allocators
*/
struct ldb_alloc_ops {
- void *(*alloc)(void *context, void *ptr, size_t size);
+ void *(*alloc)(const void *context, void *ptr, size_t size);
void *context;
};
@@ -320,7 +320,7 @@ const char *ldb_msg_find_string(const struct ldb_message *msg,
which often take a context argument
*/
int ldb_set_alloc(struct ldb_context *ldb,
- void *(*alloc)(void *context, void *ptr, size_t size),
+ void *(*alloc)(const void *context, void *ptr, size_t size),
void *context);
/*