#include <grp.h>
#include <pwd.h>
#include <sys/stat.h>
-#if defined(HAVE_SYSINFO)
+#if defined(HAVE_SYSINFO) && !defined(SOLARIS)
#include <sys/sysinfo.h>
#endif
#ifdef linux
double option_maxload; /*!< Max load avg on system */
int option_maxcalls; /*!< Max number of active calls */
int option_maxfiles; /*!< Max number of open file handles (files, sockets) */
-#if defined(HAVE_SYSINFO)
+#if defined(HAVE_SYSINFO) && !defined(SOLARIS)
long option_minmemfree; /*!< Minimum amount of free system memory - stop accepting calls if free memory falls below this watermark */
#endif
ast_cli(fd, " Verbosity: %d\n", option_verbose);
ast_cli(fd, " Debug level: %d\n", option_debug);
ast_cli(fd, " Max load avg: %lf\n", option_maxload);
-#if defined(HAVE_SYSINFO)
+#if defined(HAVE_SYSINFO) && !defined(SOLARIS)
ast_cli(fd, " Min Free Memory: %ld MB\n", option_minmemfree);
#endif
if (ast_localtime(&ast_startuptime, &tm, NULL)) {
return 0;
}
-#if defined(HAVE_SYSINFO)
+#if defined(HAVE_SYSINFO) && !defined(SOLARIS)
static const char show_sysinfo_help[] =
"Usage: core show sysinfo\n"
" List current system information.\n";
handle_show_threads, "Show running threads",
show_threads_help },
-#if defined(HAVE_SYSINFO)
+#if defined(HAVE_SYSINFO) && !defined(SOLARIS)
{ { "core", "show", "sysinfo", NULL },
handle_show_sysinfo, "Show System Information",
show_sysinfo_help },
}
} else if (!strcasecmp(v->name, "languageprefix")) {
ast_language_is_prefix = ast_true(v->value);
-#if defined(HAVE_SYSINFO)
+#if defined(HAVE_SYSINFO) && !defined(SOLARIS)
} else if (!strcasecmp(v->name, "minmemfree")) {
/* specify the minimum amount of free memory to retain. Asterisk should stop accepting new calls
* if the amount of free memory falls below this watermark */
/* Check for options */
while ((c = getopt(argc, argv, "mtThfFdvVqprRgciInx:U:G:C:L:M:e:")) != -1) {
switch (c) {
-#if defined(HAVE_SYSINFO)
+#if defined(HAVE_SYSINFO) && !defined(SOLARIS)
case 'e':
if ((sscanf(&optarg[1], "%ld", &option_minmemfree) != 1) || (option_minmemfree < 0)) {
option_minmemfree = 0;