diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2010-07-08 09:45:25 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2010-07-08 09:45:25 +0000 |
commit | 836efa79e6397dda69543c7b553e33f5bcf2d615 (patch) | |
tree | 4b72cd280d512f4e3af8ffba58cadcd27566ff9d /testing/open-vm-tools/getloadavg-uclibc.patch | |
parent | 38c4ccd875603ddc883e6bdb30f8e062f3ac1734 (diff) | |
download | aports-836efa79e6397dda69543c7b553e33f5bcf2d615.tar.bz2 aports-836efa79e6397dda69543c7b553e33f5bcf2d615.tar.xz |
testing/open-vm-tools: new aport
The Open Virtual Machine Tools are the open source implementation of VMware Tools.
http://open-vm-tools.sourceforge.net/
Diffstat (limited to 'testing/open-vm-tools/getloadavg-uclibc.patch')
-rw-r--r-- | testing/open-vm-tools/getloadavg-uclibc.patch | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/testing/open-vm-tools/getloadavg-uclibc.patch b/testing/open-vm-tools/getloadavg-uclibc.patch new file mode 100644 index 0000000000..247bd70374 --- /dev/null +++ b/testing/open-vm-tools/getloadavg-uclibc.patch @@ -0,0 +1,22 @@ +diff --git a/lib/misc/hostinfoPosix.c b/lib/misc/hostinfoPosix.c +index eeeb620..67387be 100644 +--- a/lib/misc/hostinfoPosix.c ++++ b/lib/misc/hostinfoPosix.c +@@ -1355,8 +1355,16 @@ HostinfoGetLoadAverage(float *avg0, // IN/OUT: + float *avg1, // IN/OUT: + float *avg2) // IN/OUT: + { ++#if defined(__UCLIBC__) ++ FILE *f; ++ if ((f = fopen("/proc/loadavg", "r")) == NULL) ++ return FALSE; ++ fscanf(f, "%f %f %f", avg0, avg1, avg2); ++ fclose(f); ++ return TRUE; ++ + /* getloadavg(3) was introduced with glibc 2.2 */ +-#if defined(GLIBC_VERSION_22) || defined(__APPLE__) ++#elif defined(GLIBC_VERSION_22) || defined(__APPLE__) + double avg[3]; + int res; + |