r141: A number of changes to get things working on FreeBSD and reduce the breakage
[ira/wip.git] / source4 / include / includes.h
index be0f7baaf40c514cfcf80a11f73a2a87e66c7df2..79fca5f7b497f75a559d397ce453981cf1feb83f 100644 (file)
@@ -741,6 +741,15 @@ struct functable {
        int (*fn)(int argc, const char **argv);
 };
 
+#define malloc_p(type) (type *)malloc(sizeof(type))
+#define malloc_array_p(type, count) (type *)realloc_array(NULL, sizeof(type), count)
+#define realloc_p(p, type, count) (type *)realloc_array(p, sizeof(type), count)
+
+#ifndef HAVE_COMPARISON_FN_T
+typedef int (*comparison_fn_t)(const void *, const void *);
+#endif
+
+#include "lib/ldb/include/ldb_parse.h"
 
 #include "nsswitch/nss.h"