summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xcontrib/scripts/install_prereq40
-rw-r--r--include/asterisk/channel.h4
-rw-r--r--include/asterisk/datastore.h2
-rw-r--r--include/asterisk/stringfields.h2
-rw-r--r--include/asterisk/utils.h2
-rw-r--r--main/channel.c2
-rw-r--r--utils/extconf.c2
7 files changed, 43 insertions, 11 deletions
diff --git a/contrib/scripts/install_prereq b/contrib/scripts/install_prereq
index 1270349bd..dae8dee68 100755
--- a/contrib/scripts/install_prereq
+++ b/contrib/scripts/install_prereq
@@ -51,6 +51,22 @@ PACKAGES_RH="$PACKAGES_RH wget subversion"
PACKAGES_RH="$PACKAGES_RH bzip2 patch python-devel"
# Basic build system:
+PACKAGES_SUSE="make gcc gcc-c++ pkg-config"
+# Asterisk: basic requirements:
+PACKAGES_SUSE="$PACKAGES_SUSE libedit-devel libjansson-devel libuuid-devel sqlite3-devel libxml2-devel"
+# Asterisk: for addons:
+PACKAGES_SUSE="$PACKAGES_SUSE speex-devel speexdsp-devel libogg-devel libvorbis-devel alsa-devel portaudio-devel libcurl-devel xmlstarlet bison flex"
+PACKAGES_SUSE="$PACKAGES_SUSE postgresql-devel unixODBC-devel libtool libneon-devel gmime-devel lua-devel liburiparser-devel libxslt-devel libopenssl-devel"
+PACKAGES_SUSE="$PACKAGES_SUSE libmysqlclient-devel bluez-devel freeradius-client-devel freetds-devel bash"
+PACKAGES_SUSE="$PACKAGES_SUSE net-snmp-devel iksemel-devel libcorosync-devel newt-devel popt-devel libical-devel spandsp-devel"
+PACKAGES_SUSE="$PACKAGES_SUSE imap-devel libsrtp2-devel libgsm-devel doxygen graphviz zlib-devel openldap2-devel"
+PACKAGES_SUSE="$PACKAGES_SUSE codec2-devel fftw3-devel libsndfile-devel unbound-devel"
+# Asterisk: for the unpackaged below:
+PACKAGES_SUSE="$PACKAGES_SUSE wget subversion"
+# Asterisk: for ./configure --with-pjproject-bundled:
+PACKAGES_SUSE="$PACKAGES_SUSE bzip2 patch python-devel"
+
+# Basic build system:
PACKAGES_NBSD="gmake pkg-config"
# Asterisk: basic requirements:
PACKAGES_NBSD="$PACKAGES_NBSD editline jansson sqlite3 libuuid libxml2"
@@ -165,6 +181,15 @@ check_installed_fpkgs() {
done
}
+check_installed_zypper() {
+ for pack in "$@"
+ do
+ if ! zypper se -ixnC $pack >/dev/null 2>/dev/null
+ then echo $pack
+ fi
+ done
+}
+
handle_debian() {
if ! [ -x "$(command -v aptitude)" ]; then
apt-get install aptitude
@@ -208,6 +233,13 @@ handle_fbsd() {
fi
}
+handle_SUSE() {
+ extra_packs=`check_installed_zypper $PACKAGES_SUSE`
+ if [ x"$extra_packs" != "x" ] ; then
+ $testcmd zypper install --no-confirm $extra_packs
+ fi
+}
+
install_unpackaged() {
echo "*** Installing NBS (Network Broadcast Sound) ***"
svn co http://svn.digium.com/svn/nbs/trunk nbs-trunk
@@ -284,10 +316,6 @@ if [ -f /etc/mandrake-release ]; then
unsupported_distro='Mandriva'
fi
-if [ -f /etc/SuSE-release ]; then
- unsupported_distro='SUSE'
-fi
-
if [ -f /etc/slackware-version ]; then
unsupported_distro='Slackware'
fi
@@ -302,6 +330,10 @@ if [ -r /etc/debian_version ]; then
handle_debian
elif [ -r /etc/redhat-release ]; then
handle_rh
+elif [ -f /etc/SuSE-release -o -f /etc/novell-release ]; then
+ handle_SUSE
+elif [ -f /etc/os-release ] && . /etc/os-release && [ "$ID" = "opensuse" ]; then
+ handle_SUSE
elif [ "$OS" = 'NetBSD' ]; then
handle_nbsd
elif [ "$OS" = 'OpenBSD' ]; then
diff --git a/include/asterisk/channel.h b/include/asterisk/channel.h
index 3dfbe61d9..8cb03800e 100644
--- a/include/asterisk/channel.h
+++ b/include/asterisk/channel.h
@@ -1149,7 +1149,7 @@ enum ama_flags {
* \deprecated You should use the ast_datastore_alloc() generic function instead.
* \version 1.6.1 deprecated
*/
-struct ast_datastore * attribute_malloc ast_channel_datastore_alloc(const struct ast_datastore_info *info, const char *uid)
+struct ast_datastore *ast_channel_datastore_alloc(const struct ast_datastore_info *info, const char *uid)
__attribute__((deprecated));
/*!
@@ -1208,7 +1208,7 @@ struct ast_datastore *ast_channel_datastore_find(struct ast_channel *chan, const
* and "default" context.
* \note Since 12.0.0 this function returns with the newly created channel locked.
*/
-struct ast_channel * attribute_malloc __attribute__((format(printf, 15, 16)))
+struct ast_channel * __attribute__((format(printf, 15, 16)))
__ast_channel_alloc(int needqueue, int state, const char *cid_num,
const char *cid_name, const char *acctcode,
const char *exten, const char *context, const struct ast_assigned_ids *assignedids,
diff --git a/include/asterisk/datastore.h b/include/asterisk/datastore.h
index 8d6516bc1..7a7d99be6 100644
--- a/include/asterisk/datastore.h
+++ b/include/asterisk/datastore.h
@@ -82,7 +82,7 @@ struct ast_datastore {
* \param file, line, function
* \version 1.6.1 moved here and renamed from ast_channel_datastore_alloc
*/
-struct ast_datastore * attribute_malloc __ast_datastore_alloc(
+struct ast_datastore *__ast_datastore_alloc(
const struct ast_datastore_info *info, const char *uid, struct ast_module *mod,
const char *file, int line, const char *function);
diff --git a/include/asterisk/stringfields.h b/include/asterisk/stringfields.h
index 5ac5e0973..e1ff2fc1d 100644
--- a/include/asterisk/stringfields.h
+++ b/include/asterisk/stringfields.h
@@ -434,7 +434,7 @@ int __ast_string_field_init(struct ast_string_field_mgr *mgr, struct ast_string_
* \internal
* \brief internal version of ast_calloc_with_stringfields
*/
-void * attribute_malloc __ast_calloc_with_stringfields(unsigned int num_structs,
+void *__ast_calloc_with_stringfields(unsigned int num_structs,
size_t struct_size, size_t field_mgr_offset, size_t field_mgr_pool_offset, size_t pool_size,
const char *file, int lineno, const char *func);
diff --git a/include/asterisk/utils.h b/include/asterisk/utils.h
index c00310d39..bb9aa2a3c 100644
--- a/include/asterisk/utils.h
+++ b/include/asterisk/utils.h
@@ -617,7 +617,7 @@ void * attribute_malloc __ast_calloc_cache(size_t num, size_t len, const char *f
)
AST_INLINE_API(
-void * attribute_malloc __ast_realloc(void *p, size_t len, const char *file, int lineno, const char *func),
+void *__ast_realloc(void *p, size_t len, const char *file, int lineno, const char *func),
{
void *newp;
diff --git a/main/channel.c b/main/channel.c
index c71d19b81..2779aa827 100644
--- a/main/channel.c
+++ b/main/channel.c
@@ -782,7 +782,7 @@ static int does_id_conflict(const char *uniqueid)
}
/*! \brief Create a new channel structure */
-static struct ast_channel * attribute_malloc __attribute__((format(printf, 15, 0)))
+static struct ast_channel *__attribute__((format(printf, 15, 0)))
__ast_channel_alloc_ap(int needqueue, int state, const char *cid_num, const char *cid_name,
const char *acctcode, const char *exten, const char *context, const struct ast_assigned_ids *assignedids,
const struct ast_channel *requestor, enum ama_flags amaflag, struct ast_endpoint *endpoint,
diff --git a/utils/extconf.c b/utils/extconf.c
index 1be739c17..5b3a95be9 100644
--- a/utils/extconf.c
+++ b/utils/extconf.c
@@ -780,7 +780,7 @@ void * attribute_malloc __ast_calloc(size_t num, size_t len, const char *file, i
__ast_realloc((p), (len), __FILE__, __LINE__, __PRETTY_FUNCTION__)
AST_INLINE_API(
-void * attribute_malloc __ast_realloc(void *p, size_t len, const char *file, int lineno, const char *func),
+void *__ast_realloc(void *p, size_t len, const char *file, int lineno, const char *func),
{
void *newp;