diff options
Diffstat (limited to 'sysutils/wmavgload/files/patch-aa')
-rw-r--r-- | sysutils/wmavgload/files/patch-aa | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/sysutils/wmavgload/files/patch-aa b/sysutils/wmavgload/files/patch-aa new file mode 100644 index 0000000..1692321 --- /dev/null +++ b/sysutils/wmavgload/files/patch-aa @@ -0,0 +1,53 @@ +*** get_load.c.orig Sat Jul 18 22:25:14 1998 +--- get_load.c Sat Jul 18 22:30:55 1998 +*************** +*** 1,4 **** +! #ifdef linux + + #include <stdio.h> + #include <fcntl.h> +--- 1,4 ---- +! #if defined (linux) || defined (__FreeBSD__) + + #include <stdio.h> + #include <fcntl.h> +*************** +*** 45,51 **** + /* pas de verif ... */ + } + +! #else + /* SVR4 */ + void GetLoad(float *small,float *medium,float *large) + { +--- 45,51 ---- + /* pas de verif ... */ + } + +! #elif defined(SVR4) + /* SVR4 */ + void GetLoad(float *small,float *medium,float *large) + { +*************** +*** 65,68 **** + *large = (float)res.avenrun[2]/FSCALE; + } + +! #endif +--- 65,80 ---- + *large = (float)res.avenrun[2]/FSCALE; + } + +! #else +! /* FreeBSD */ +! void GetLoad(float *small,float *medium,float *large) +! { +! double avenrun[3]; +! (void) getloadavg(avenrun, sizeof(avenrun) / sizeof(avenrun[0])); +! +! *small = (float)avenrun[0]; +! *medium = (float)avenrun[1]; +! *large = (float)avenrun[2]; +! } +! +! #endif |