Module: sip-router Branch: master Commit: 2e5145ecdd8368c947ea93b98449ebd997824ce2 URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=2e5145ec...
Author: Marius Zbihlei marius.zbihlei@1and1.ro Committer: Marius Zbihlei marius.zbihlei@1and1.ro Date: Mon Sep 17 10:17:41 2012 +0300
Provide inline linkage for non-gcc compilers(like clang)
Inline method in headers should be declared extern.
---
lib/srdb1/db_res.h | 12 ++++++------ lib/srdb1/db_row.h | 4 ++-- modules/ctl/binrpc_run.c | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/lib/srdb1/db_res.h b/lib/srdb1/db_res.h index 82734b3..f8f909f 100644 --- a/lib/srdb1/db_res.h +++ b/lib/srdb1/db_res.h @@ -85,7 +85,7 @@ typedef struct db1_res { * \param _r the result that should be released * \return zero on success, negative on errors */ -inline int db_free_rows(db1_res_t* _r); +extern inline int db_free_rows(db1_res_t* _r);
/** @@ -95,20 +95,20 @@ inline int db_free_rows(db1_res_t* _r); * \param _r the result that should be released * \return zero on success, negative on errors */ -inline int db_free_columns(db1_res_t* _r); +extern inline int db_free_columns(db1_res_t* _r);
/** * Create a new result structure and initialize it. * \return a pointer to the new result on success, NULL on errors */ -inline db1_res_t* db_new_result(void); +extern inline db1_res_t* db_new_result(void);
/** * Release memory used by a result structure. * \return zero on success, negative on errors */ -inline int db_free_result(db1_res_t* _r); +extern inline int db_free_result(db1_res_t* _r);
/** * Allocate storage for column names and type in existing result structure. @@ -118,7 +118,7 @@ inline int db_free_result(db1_res_t* _r); * \param cols number of columns * \return zero on success, negative on errors */ -inline int db_allocate_columns(db1_res_t* _r, const unsigned int cols); +extern inline int db_allocate_columns(db1_res_t* _r, const unsigned int cols);
/** @@ -126,6 +126,6 @@ inline int db_allocate_columns(db1_res_t* _r, const unsigned int cols); * \param _res result set * \return zero on success, negative on errors */ -inline int db_allocate_rows(db1_res_t* _res); +extern inline int db_allocate_rows(db1_res_t* _res);
#endif /* DB1_RES_H */ diff --git a/lib/srdb1/db_row.h b/lib/srdb1/db_row.h index 855ed3d..6bee889 100644 --- a/lib/srdb1/db_row.h +++ b/lib/srdb1/db_row.h @@ -62,7 +62,7 @@ typedef struct db_row { * \param _r row that should be released * \return zero on success, negative on error */ -inline int db_free_row(db_row_t* _r); +extern inline int db_free_row(db_row_t* _r);
/** @@ -71,6 +71,6 @@ inline int db_free_row(db_row_t* _r); * \param _row filled row * \return zero on success, negative on errors */ -inline int db_allocate_row(const db1_res_t* _res, db_row_t* _row); +extern inline int db_allocate_row(const db1_res_t* _res, db_row_t* _row);
#endif /* DB1_ROW_H */ diff --git a/modules/ctl/binrpc_run.c b/modules/ctl/binrpc_run.c index 3e3e33f..211d025 100644 --- a/modules/ctl/binrpc_run.c +++ b/modules/ctl/binrpc_run.c @@ -384,7 +384,7 @@ end:
-inline void destroy_binrpc_ctx(struct binrpc_ctx* ctx) +static inline void destroy_binrpc_ctx(struct binrpc_ctx* ctx) { free_structs(&ctx->out.structs); if (ctx->out.pkt.body){