issue #5549
authorKevin P. Fleming <kpfleming@digium.com>
Tue, 1 Nov 2005 20:26:29 +0000 (20:26 +0000)
committerKevin P. Fleming <kpfleming@digium.com>
Tue, 1 Nov 2005 20:26:29 +0000 (20:26 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6930 65c4cc65-6c06-0410-ace0-fbb531ad65f3

ChangeLog
utils.c

index bb182b6..4fa546c 100755 (executable)
--- 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 054258c..d3292ff 100755 (executable)
--- 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)
 {