Index: apps/app_skel.c =================================================================== --- apps/app_skel.c (revision 398635) +++ apps/app_skel.c (working copy) @@ -193,7 +193,7 @@ .category = "^general$", }; -struct aco_type *global_options[] = ACO_TYPES(&global_option); +static struct aco_type *global_options[] = ACO_TYPES(&global_option); /*! \brief An aco_type structure to link the "sounds" category to the skel_global_config type */ static struct aco_type sound_option = { @@ -203,7 +203,7 @@ .category = "^sounds$", }; -struct aco_type *sound_options[] = ACO_TYPES(&sound_option); +static struct aco_type *sound_options[] = ACO_TYPES(&sound_option); /*! \brief An aco_type structure to link the everything but the "general" and "sounds" categories to the skel_level type */ static struct aco_type level_option = { @@ -215,9 +215,9 @@ .item_offset = offsetof(struct skel_config, levels), }; -struct aco_type *level_options[] = ACO_TYPES(&level_option); +static struct aco_type *level_options[] = ACO_TYPES(&level_option); -struct aco_file app_skel_conf = { +static struct aco_file app_skel_conf = { .filename = "app_skel.conf", .types = ACO_TYPES(&global_option, &sound_option, &level_option), }; Index: main/db.c =================================================================== --- main/db.c (revision 398635) +++ main/db.c (working copy) @@ -116,7 +116,7 @@ static void db_sync(void); #define DEFINE_SQL_STATEMENT(stmt,sql) static sqlite3_stmt *stmt; \ - const char stmt##_sql[] = sql; + static const char stmt##_sql[] = sql; DEFINE_SQL_STATEMENT(put_stmt, "INSERT OR REPLACE INTO astdb (key, value) VALUES (?, ?)") DEFINE_SQL_STATEMENT(get_stmt, "SELECT value FROM astdb WHERE key=?") Index: main/Makefile =================================================================== --- main/Makefile (revision 398635) +++ main/Makefile (working copy) @@ -164,6 +164,13 @@ AST_EMBED_LIBS:=$(foreach dep,$(EMBED_LIBS),$(value $(dep))) OBJS:=$(sort $(OBJS)) +ifneq ($(findstring EMBED_RES,$(MENUSELECT_EMBED)),) + ifeq ($(findstring res_rtp_asterisk,$(MENUSELECT_RES)),) + AST_EMBED_LDFLAGS+=$(shell make --no-print-directory --quiet -C $(ASTTOPDIR)/res PJPROJECT_EMBED_LDFLAGS) + AST_EMBED_LIBS+=$(shell make --no-print-directory --quiet -C $(ASTTOPDIR)/res PJPROJECT_EMBED_LIBS) + endif +endif + ifneq ($(wildcard ../channels/h323/Makefile.ast),) include ../channels/h323/Makefile.ast else Index: main/manager.c =================================================================== --- main/manager.c (revision 398635) +++ main/manager.c (working copy) @@ -1192,7 +1192,7 @@ static AST_RWLIST_HEAD_STATIC(manager_hooks, manager_custom_hook); /*! \brief A container of event documentation nodes */ -AO2_GLOBAL_OBJ_STATIC(event_docs); +static AO2_GLOBAL_OBJ_STATIC(event_docs); static void free_channelvars(void); Index: main/named_acl.c =================================================================== --- main/named_acl.c (revision 398635) +++ main/named_acl.c (working copy) @@ -86,11 +86,9 @@ }; /* This array of aco_type structs is necessary to use aco_option_register */ -struct aco_type *named_acl_types[] = ACO_TYPES(&named_acl_type); +static struct aco_type *named_acl_types[] = ACO_TYPES(&named_acl_type); -struct aco_type *global_options[] = ACO_TYPES(&global_option); - -struct aco_file named_acl_conf = { +static struct aco_file named_acl_conf = { .filename = "acl.conf", .types = ACO_TYPES(&named_acl_type, &global_option), }; Index: res/Makefile =================================================================== --- res/Makefile (revision 398635) +++ res/Makefile (working copy) @@ -76,7 +76,7 @@ pjproject/build.mak: pjproject/aconfigure (cd pjproject && CFLAGS="-fPIC" ./configure --build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM) --disable-floating-point --disable-sound --disable-oss --disable-speex-aec --disable-l16-codec --disable-gsm-codec --disable-g722-codec --disable-g7221-codec --disable-speex-codec --disable-ilbc-codec --disable-g711-codec) -ifneq ($(findstring $(MAKECMDGOALS),all),) +ifneq ($(findstring $(MAKECMDGOALS),all PJPROJECT_EMBED_LDFLAGS PJPROJECT_EMBED_LIBS),) -include pjproject/build.mak endif @@ -90,6 +90,15 @@ res_rtp_asterisk.o: $(PJ_LIB_FILES) res_rtp_asterisk.o: _ASTCFLAGS+=-DUSE_PJPROJECT res_rtp_asterisk.o: _ASTCFLAGS+=$(PJ_CFLAGS) +ifneq ($(findstring res_rtp_asterisk,$(EMBEDDED_MODS)),) +PJPROJECT_EMBED_LDFLAGS: FORCE + echo "$(PJ_LDFLAGS)" + +PJPROJECT_EMBED_LIBS: FORCE + echo "$(PJ_LDLIBS)" + +else res_rtp_asterisk.so: _ASTLDFLAGS+=$(PJ_LDFLAGS) res_rtp_asterisk.so: LIBS+=$(PJ_LDLIBS) -endif \ No newline at end of file +endif +endif Index: res/res_config_sqlite3.c =================================================================== --- res/res_config_sqlite3.c (revision 398635) +++ res/res_config_sqlite3.c (working copy) @@ -61,7 +61,7 @@ static int realtime_sqlite3_require(const char *database, const char *table, va_list ap); static int realtime_sqlite3_unload(const char *database, const char *table); -struct ast_config_engine sqlite3_config_engine = { +static struct ast_config_engine sqlite3_config_engine = { .name = "sqlite3", .load_func = realtime_sqlite3_load, .realtime_func = realtime_sqlite3, @@ -96,7 +96,7 @@ unsigned int batch; }; -struct ao2_container *databases; +static struct ao2_container *databases; #define DB_BUCKETS 7 AST_MUTEX_DEFINE_STATIC(config_lock); @@ -107,8 +107,8 @@ AST_THREADSTORAGE(escape_value_buf); static int realtime_sqlite3_execute_handle(struct realtime_sqlite3_db *db, const char *sql, int (*callback)(void*, int, char **, char **), void *arg, int sync); -void db_start_batch(struct realtime_sqlite3_db *db); -void db_stop_batch(struct realtime_sqlite3_db *db); +static void db_start_batch(struct realtime_sqlite3_db *db); +static void db_stop_batch(struct realtime_sqlite3_db *db); static inline const char *sqlite3_escape_string_helper(struct ast_threadstorage *ts, const char *param) { @@ -333,7 +333,7 @@ ast_cond_signal(&db->cond); } -void db_start_batch(struct realtime_sqlite3_db *db) +static void db_start_batch(struct realtime_sqlite3_db *db) { if (db->batch) { ast_cond_init(&db->cond, NULL); @@ -342,7 +342,7 @@ } } -void db_stop_batch(struct realtime_sqlite3_db *db) +static void db_stop_batch(struct realtime_sqlite3_db *db) { if (db->batch) { db->exiting = 1; Index: res/res_xmpp.c =================================================================== --- res/res_xmpp.c (revision 398635) +++ res/res_xmpp.c (working copy) @@ -654,7 +654,7 @@ .category = "^general$", }; -struct aco_type *global_options[] = ACO_TYPES(&global_option); +static struct aco_type *global_options[] = ACO_TYPES(&global_option); static struct aco_type client_option = { .type = ACO_ITEM, @@ -666,9 +666,9 @@ .item_offset = offsetof(struct xmpp_config, clients), }; -struct aco_type *client_options[] = ACO_TYPES(&client_option); +static struct aco_type *client_options[] = ACO_TYPES(&client_option); -struct aco_file res_xmpp_conf = { +static struct aco_file res_xmpp_conf = { .filename = "xmpp.conf", .alias = "jabber.conf", .types = ACO_TYPES(&global_option, &client_option),