Ticket #655: Compilation error on Linux when PJ_HAS_POOL_ALT_API is used (thanks Gang Liu for the report)
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@2341 74dad513-b988-da41-8d7b-12977e46ad98
diff --git a/pjlib/include/pj/pool_alt.h b/pjlib/include/pj/pool_alt.h
index c624554..55a9a0b 100644
--- a/pjlib/include/pj/pool_alt.h
+++ b/pjlib/include/pj/pool_alt.h
@@ -38,14 +38,14 @@
};
-typedef struct pj_pool_t
+struct pj_pool_t
{
struct pj_pool_mem *first_mem;
pj_pool_factory *factory;
char obj_name[32];
pj_size_t used_size;
pj_pool_callback *cb;
-} pj_pool_t;
+};
#define PJ_POOL_SIZE (sizeof(struct pj_pool_t))
@@ -167,17 +167,27 @@
} pj_pool_factory_policy;
-typedef struct pj_pool_factory
+struct pj_pool_factory
{
pj_pool_factory_policy policy;
int dummy;
-} pj_pool_factory;
+};
-typedef struct pj_caching_pool
+struct pj_caching_pool
{
pj_pool_factory factory;
-} pj_caching_pool;
+ /* just to make it compilable */
+ unsigned used_count;
+ unsigned used_size;
+ unsigned peak_used_size;
+};
+
+/* just to make it compilable */
+typedef struct pj_pool_block
+{
+ int dummy;
+} pj_pool_block;
#define pj_caching_pool_init( cp, pol, mac)
#define pj_caching_pool_destroy(cp)