From c40a6caac3396ca1337a5f69b466520021d215d4 Mon Sep 17 00:00:00 2001 From: Matthew Jordan Date: Sun, 22 Mar 2015 20:32:17 +0000 Subject: [PATCH] Fix compilation issues for OpenBSD This patch addresses compilation issues for OpenBSD. Specifically, it addresses: * It allows including 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 | 2 -- main/xmldoc.c | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/main/asterisk.c b/main/asterisk.c index 185e95b528..55d35e2387 100644 --- a/main/asterisk.c +++ b/main/asterisk.c @@ -87,12 +87,10 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #elif defined(HAVE_SYSCTL) #include #include -#if !defined(__OpenBSD__) #include #if defined(__FreeBSD__) #include #endif -#endif #if defined(HAVE_SWAPCTL) #include #endif diff --git a/main/xmldoc.c b/main/xmldoc.c index f07358eec4..4689c40f86 100644 --- a/main/xmldoc.c +++ b/main/xmldoc.c @@ -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);