diff options
author | Matthew Jordan <mjordan@digium.com> | 2015-03-22 23:04:53 +0000 |
---|---|---|
committer | Matthew Jordan <mjordan@digium.com> | 2015-03-22 23:04:53 +0000 |
commit | 08a88aab159b99588bf705e3e325813c07ae5d0f (patch) | |
tree | bd3daa36bd75e543525fad3d5daa90b4adb5960d | |
parent | 6ca98524bfc321c12398df5ed0cac6c7cad3c55c (diff) |
Fix compilation issues for OpenBSD
This patch addresses compilation issues for OpenBSD. Specifically, it
addresses:
* It allows including <sys/vmmeter.h> in asterisk.c
* Provides a needed (size_t) cast in xmldoc.c
In 13+, it also addresses a conditional inclusion in loader.c.
Review: https://reviewboard.asterisk.org/r/4506
ASTERISK-24880 #close
Reported by: snuffy
Tested by: snuffy
patches:
misc-openbsd.diff uploaded by snuffy (License 5024)
........
Merged revisions 433245 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@433247 65c4cc65-6c06-0410-ace0-fbb531ad65f3
-rw-r--r-- | main/asterisk.c | 2 | ||||
-rw-r--r-- | main/loader.c | 2 | ||||
-rw-r--r-- | main/xmldoc.c | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/main/asterisk.c b/main/asterisk.c index eddb20383..08d9ae15e 100644 --- a/main/asterisk.c +++ b/main/asterisk.c @@ -171,12 +171,10 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #elif defined(HAVE_SYSCTL) #include <sys/param.h> #include <sys/sysctl.h> -#if !defined(__OpenBSD__) #include <sys/vmmeter.h> #if defined(__FreeBSD__) #include <vm/vm_param.h> #endif -#endif #if defined(HAVE_SWAPCTL) #include <sys/swap.h> #endif diff --git a/main/loader.c b/main/loader.c index f2f3e234a..3a596bcf4 100644 --- a/main/loader.c +++ b/main/loader.c @@ -483,7 +483,9 @@ static int is_module_loaded(const char *resource_name) static void unload_dynamic_module(struct ast_module *mod) { +#if defined(HAVE_RTLD_NOLOAD) char *name = ast_strdupa(ast_module_name(mod)); +#endif void *lib = mod->lib; /* WARNING: the structure pointed to by mod is going to diff --git a/main/xmldoc.c b/main/xmldoc.c index e334e878e..2f4f063b9 100644 --- a/main/xmldoc.c +++ b/main/xmldoc.c @@ -2979,7 +2979,7 @@ int ast_xmldoc_load_documentation(void) globret = glob(xmlpattern, MY_GLOB_FLAGS, NULL, &globbuf); #endif - ast_debug(3, "gl_pathc %zu\n", globbuf.gl_pathc); + ast_debug(3, "gl_pathc %zu\n", (size_t)globbuf.gl_pathc); if (globret == GLOB_NOSPACE) { ast_log(LOG_WARNING, "XML load failure, glob expansion of pattern '%s' failed: Not enough memory\n", xmlpattern); ast_free(xmlpattern); |