aboutsummaryrefslogtreecommitdiffstats
path: root/science
diff options
context:
space:
mode:
authormaho <maho@FreeBSD.org>2003-08-08 22:55:28 +0800
committermaho <maho@FreeBSD.org>2003-08-08 22:55:28 +0800
commit72eb375318baeede05b3ac662eae8e499dfc488b (patch)
tree5ca26ca4c157085029870a794df97ef4a32a616a /science
parentc057027996ccf220ecba6c0713de655a80bd98d1 (diff)
downloadfreebsd-ports-gnome-72eb375318baeede05b3ac662eae8e499dfc488b.tar.gz
freebsd-ports-gnome-72eb375318baeede05b3ac662eae8e499dfc488b.tar.zst
freebsd-ports-gnome-72eb375318baeede05b3ac662eae8e499dfc488b.zip
Fix build on 4-STABLE
Submitted by: kris via bento
Diffstat (limited to 'science')
-rw-r--r--science/2dhf/files/patch-src+getusedcpu.c46
1 files changed, 25 insertions, 21 deletions
diff --git a/science/2dhf/files/patch-src+getusedcpu.c b/science/2dhf/files/patch-src+getusedcpu.c
index fabdbf41caf6..5d1b54b6c4ae 100644
--- a/science/2dhf/files/patch-src+getusedcpu.c
+++ b/science/2dhf/files/patch-src+getusedcpu.c
@@ -1,33 +1,37 @@
--- src/getusedcpu.c.orig Sat Jan 4 21:21:37 2003
-+++ src/getusedcpu.c Thu Jul 24 17:30:40 2003
-@@ -66,7 +66,9 @@
- #include <stdio.h>
++++ src/getusedcpu.c Tue Aug 5 07:02:39 2003
+@@ -67,7 +67,6 @@
#include <string.h>
#include <ctype.h>
--
-+#ifdef __FreeBSD__
-+#include <sys/unistd.h>
-+#endif
+-
#include <sys/types.h>
#include <sys/times.h>
-@@ -109,6 +111,9 @@
- #elif defined(ymp)
+ #include <sys/param.h>
+@@ -76,7 +75,7 @@
+ #include <sys/acct.h>
+ #endif
+
+-#if defined(ymp)
++#if defined(ymp) || defined (__FreeBSD__)
+ #include <time.h>
+ #endif
+
+@@ -106,7 +105,7 @@
+ #if defined(dec)
+ start = (float)(buffer.tms_utime + buffer.tms_stime) / (float)(AHZ);
+ start_child = (float)(buffer.tms_cutime + buffer.tms_cstime)/ (float)(AHZ);
+-#elif defined(ymp)
++#elif defined(ymp) || defined(__FreeBSD__)
start = (float)(buffer.tms_utime + buffer.tms_stime) / (float)(CLK_TCK);
start_child = (float)(buffer.tms_cutime + buffer.tms_cstime) / (float)(CLK_TCK);
-+#elif defined(__FreeBSD__)
-+ start = (float)(buffer.tms_utime + buffer.tms_stime) / (float)(_SC_CLK_TCK);
-+ start_child = (float)(buffer.tms_cutime + buffer.tms_cstime) / (float)(_SC_CLK_TCK);
#else
- start = (float)(buffer.tms_utime + buffer.tms_stime) / (float)(HZ);
- start_child = (float)(buffer.tms_cutime + buffer.tms_cstime) / (float)(HZ);
-@@ -121,6 +126,9 @@
- #elif defined(ymp)
+@@ -118,7 +117,7 @@
+ #if defined(dec)
+ *Msecs = (float)(buffer.tms_utime + buffer.tms_stime) / (float)(AHZ) - start_child;
+ *Csecs = (float)(buffer.tms_cutime + buffer.tms_cstime)/ (float)(AHZ) - start_child;
+-#elif defined(ymp)
++#elif defined(ymp) || defined(__FreeBSD__)
*Msecs = (float)(buffer.tms_utime + buffer.tms_stime) / (float)(CLK_TCK) - start;
*Csecs = (float)(buffer.tms_cutime + buffer.tms_cstime) / (float)(CLK_TCK) - start_child;
-+#elif defined(__FreeBSD__)
-+ *Msecs = (float)(buffer.tms_utime + buffer.tms_stime) / (float)(_SC_CLK_TCK) - start;
-+ *Csecs = (float)(buffer.tms_cutime + buffer.tms_cstime) / (float)(_SC_CLK_TCK) - start_child;
#else
- *Msecs = (float)(buffer.tms_utime + buffer.tms_stime) / (float)(HZ) - start;
- *Csecs = (float)(buffer.tms_cutime + buffer.tms_cstime) / (float)(HZ) - start_child;