]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Fix compilation issues for OpenBSD
authorMatthew Jordan <mjordan@digium.com>
Sun, 22 Mar 2015 20:32:17 +0000 (20:32 +0000)
committerMatthew Jordan <mjordan@digium.com>
Sun, 22 Mar 2015 20:32:17 +0000 (20:32 +0000)
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)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@433245 65c4cc65-6c06-0410-ace0-fbb531ad65f3

main/asterisk.c
main/xmldoc.c

index 185e95b528108594636ea208db9503c9465c9e50..55d35e2387e002bcdd4712d42cb35981f6473d5a 100644 (file)
@@ -87,12 +87,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
index f07358eec4940ea21f7397fce7c161d6e8dbe34b..4689c40f86f755699dde5e515790083a8e1c3743 100644 (file)
@@ -2413,7 +2413,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);