summaryrefslogtreecommitdiff
path: root/source4/lib/util/data_blob.h
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib/util/data_blob.h')
-rw-r--r--source4/lib/util/data_blob.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/source4/lib/util/data_blob.h b/source4/lib/util/data_blob.h
index acecb88132..e39b2eaf45 100644
--- a/source4/lib/util/data_blob.h
+++ b/source4/lib/util/data_blob.h
@@ -19,6 +19,12 @@
#ifndef _SAMBA_DATABLOB_H_
#define _SAMBA_DATABLOB_H_
+#ifndef _PUBLIC_
+#define _PUBLIC_
+#endif
+
+#include <talloc.h>
+
/* used to hold an arbitrary blob of data */
typedef struct datablob {
uint8_t *data;
@@ -30,6 +36,10 @@ struct data_blob_list_item {
DATA_BLOB blob;
};
+/* by making struct ldb_val and DATA_BLOB the same, we can simplify
+ a fair bit of code */
+#define ldb_val datablob
+
#define data_blob(ptr, size) data_blob_named(ptr, size, "DATA_BLOB: "__location__)
#define data_blob_talloc(ctx, ptr, size) data_blob_talloc_named(ctx, ptr, size, "DATA_BLOB: "__location__)
#define data_blob_dup_talloc(ctx, blob) data_blob_talloc_named(ctx, (blob)->data, (blob)->length, "DATA_BLOB: "__location__)