Mac OS X 10.9 now considers this function deprecated and warns on
its use, causing the buildslave configuration to error out.
On master, we added a library routine to get a process's size to opr;
opr is not present on the 1.6 branch so another route is needed here.
Since use of the OS X malloc implementation appears to have no
effect on the result of sbrk(0), there is no loss of functionality
by replacing the function call with a (different) constant value.
There may still be some value in sbrk(0) on other systems, so
only disable sbrk() for OS X, on the stable branch.
This change is specific to the 1.6 branch.
Change-Id: Ie5f96e923b78be22a9ce83d0a35a7675d517b073
Reviewed-on: http://gerrit.openafs.org/10746
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: D Brashear <shadow@your-file-system.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
if (seconds <= 0)
seconds = 1;
stats->StoreDataRate = AFSCallStats.TotalStoredBytes / seconds;
-#ifdef AFS_NT40_ENV
+#if defined(AFS_NT40_ENV) || defined(AFS_DARWIN_ENV)
stats->ProcessSize = -1; /* TODO: */
#else
stats->ProcessSize = (afs_int32) ((long)sbrk(0) >> 10);
seconds = 1;
Statistics->ViceStatistics64_val[STATS64_STOREDATARATE] =
AFSCallStats.TotalStoredBytes / seconds;
-#ifdef AFS_NT40_ENV
+#if defined(AFS_NT40_ENV) || defined(AFS_DARWIN_ENV)
Statistics->ViceStatistics64_val[STATS64_PROCESSSIZE] = -1;
#else
Statistics->ViceStatistics64_val[STATS64_PROCESSSIZE] =
audit_PrintStats(stderr);
h_PrintStats();
PrintCallBackStats();
-#ifdef AFS_NT40_ENV
+#if defined(AFS_NT40_ENV) || defined(AFS_DARWIN_ENV)
processSize = -1; /* TODO: */
#else
processSize = (int)((long)sbrk(0) >> 10);