rust/cargo-c: update to 0.10.7+cargo-0.84.0
[oi-userland.git] / components / scientific / gdl / patches / 07-objects.cpp.patch
blob2a6d0fe32c0372074f0f24982976e58244a3b85a
1 --- gdl-0.9.7/src/objects.cpp.orig Wed May 31 14:10:14 2017
2 +++ gdl-0.9.7/src/objects.cpp Wed May 31 14:38:58 2017
3 @@ -20,6 +20,11 @@
4 #include <limits>
5 #include <ios>
7 +#if defined(__sun__)
8 + #include <sys/time.h>
9 + #include <sys/loadavg.h>
10 +#endif
12 #include "str.hpp"
13 #include "gdlexception.hpp"
14 #include "initsysvar.hpp"
15 @@ -935,7 +940,16 @@
17 return default_num_threads;
21 +#elif defined(__sun__)
22 + int nelem = 3;
23 + double loadavg[nelem];
24 + (void)getloadavg(loadavg,nelem);
26 + if (.5 < loadavg[LOADAVG_15MIN])
27 + avload = 1;
29 + return (nbofproc - avload);
30 #elif defined (__unix) || defined(__unix__)
31 iff=freopen("/proc/loadavg","r",stderr);
32 fclose(stderr);