Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/freebsd-ports-gnome
Path: blob/main/benchmarks/dbs/files/patch-src_dbsd.c
16124 views
1
--- src/dbsd.c.orig 1998-06-08 00:23:26 UTC
2
+++ src/dbsd.c
3
@@ -51,6 +51,9 @@
4
5
#define DBSD
6
7
+#ifdef HAVE_SYS_PARAM_H
8
+#include <sys/param.h>
9
+#endif
10
#include <stdio.h>
11
#include <stdlib.h>
12
#include <string.h>
13
@@ -80,7 +83,7 @@
14
#include <sys/fcntl.h>
15
#endif
16
17
-#if !defined(bsdi)
18
+#if (!defined(BSD) || (BSD < 199306))
19
#include <malloc.h>
20
#endif
21
22
@@ -1002,8 +1005,13 @@ struct timeval origin_time;
23
d[i].snd_max = htonl((int)rt.d[i].td_cb.snd_max);
24
d[i].snd_cwnd = htonl((int)rt.d[i].td_cb.snd_cwnd);
25
d[i].snd_ssthresh = htonl((int)rt.d[i].td_cb.snd_ssthresh);
26
+#if !defined(__FreeBSD_version) || (__FreeBSD_version < 400009)
27
d[i].t_idle = htonl((int)rt.d[i].td_cb.t_idle);
28
d[i].t_rtt = htonl((int)rt.d[i].td_cb.t_rtt);
29
+#else
30
+ d[i].t_idle = htonl((int)rt.d[i].td_cb.t_rcvtime);
31
+ d[i].t_rtt = htonl((int)rt.d[i].td_cb.t_rtttime);
32
+#endif
33
d[i].t_rtseq = htonl((int)rt.d[i].td_cb.t_rtseq);
34
d[i].t_srtt = htonl((int)rt.d[i].td_cb.t_srtt);
35
d[i].t_rttvar = htonl((int)rt.d[i].td_cb.t_rttvar);
36
37