aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xChangeLog2
-rwxr-xr-xutils.c4
2 files changed, 4 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index bb182b673..4fa546cbc 100755
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
2005-11-01 Kevin P. Fleming <kpfleming@digium.com>
+ * utils.c (getloadavg): change to using _BSD_SOURCE as the indicator for whether this function is present or not (issue #5549)
+
* include/asterisk/utils.h (ast_slinear_saturated_add): force to be inlined whenever possible
(ast_slinear_saturated_multiply): same
(ast_slinear_saturated_divide): same
diff --git a/utils.c b/utils.c
index 054258ca6..d3292ff90 100755
--- a/utils.c
+++ b/utils.c
@@ -837,7 +837,7 @@ uint64_t strtoq(const char *nptr, char **endptr, int base)
}
#endif /* !HAVE_STRTOQ */
-#if (!defined(getloadavg))
+#if (!defined(_BSD_SOURCE))
#ifdef linux
/* Alternative method of getting load avg on Linux only */
int getloadavg(double *list, int nelem)
@@ -871,7 +871,7 @@ int getloadavg(double *list, int nelem)
return -1;
}
#endif /* linux */
-#endif /* !defined(getloadavg) */
+#endif /* !defined(_BSD_SOURCE) */
char *ast_process_quotes_and_slashes(char *start, char find, char replace_with)
{