main, res, tests: Fix compilation errors on FreeBSD.

asterisk.c, manager.c: Increase buffer sizes to avoid truncation warnings.
config.c: Include header file for WIFEXITED/WEXITSTATUS macros.
res_timing_kqueue: Use more portable format specifier.
test_crypto: Use non-linux limits.h header file.

Resolves: #916
(cherry picked from commit b8b21b3f00)
This commit is contained in:
Naveen Albert
2024-09-29 09:26:10 -04:00
committed by Asterisk Development Team
parent 2f3b10d1b2
commit 107c9e7c68
5 changed files with 5 additions and 4 deletions

View File

@@ -4340,7 +4340,7 @@ static void asterisk_daemon(int isroot, const char *runuser, const char *rungrou
if (ast_opt_console) {
/* Console stuff now... */
/* Register our quit function */
char title[256];
char title[296];
char hostname[MAXHOSTNAMELEN] = "";
if (gethostname(hostname, sizeof(hostname) - 1)) {

View File

@@ -44,6 +44,7 @@
#include <libgen.h>
#include <time.h>
#include <sys/stat.h>
#include <sys/wait.h>
#include <math.h> /* HUGE_VAL */
#include <regex.h>

View File

@@ -9443,7 +9443,7 @@ static int __init_manager(int reload, int by_external_config)
struct ast_manager_user *user = NULL;
struct ast_variable *var;
struct ast_flags config_flags = { (reload && !by_external_config) ? CONFIG_FLAG_FILEUNCHANGED : 0 };
char a1[256];
char a1[337];
char a1_hash[256];
struct ast_sockaddr ami_desc_local_address_tmp;
struct ast_sockaddr amis_desc_local_address_tmp;