Page MenuHomeFreeBSD

D60971.1793432631.diff
No OneTemporary

Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None

D60971.1793432631.diff

diff --git a/sys/net/pfvar.h b/sys/net/pfvar.h
--- a/sys/net/pfvar.h
+++ b/sys/net/pfvar.h
@@ -2809,14 +2809,6 @@
return ((t.tv_sec * 1000) + (t.tv_usec / 1000));
}
-static inline uint64_t
-SEC_TO_NSEC(uint64_t seconds)
-{
- if (seconds > UINT64_MAX / 1000000000ULL)
- return (UINT64_MAX);
- return (seconds * 1000000000ULL);
-}
-
extern struct pf_kstate *pf_find_state_byid(uint64_t, uint32_t);
extern struct pf_kstate *pf_find_state_all(
const struct pf_state_key_cmp *,
diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c
--- a/sys/netpfil/pf/pf.c
+++ b/sys/netpfil/pf/pf.c
@@ -60,6 +60,7 @@
#include <sys/socket.h>
#include <sys/sysctl.h>
#include <sys/taskqueue.h>
+#include <sys/time.h>
#include <sys/ucred.h>
#include <crypto/sha2/sha512.h>
@@ -74,7 +75,6 @@
#include <net/vnet.h>
#include <net/pfil.h>
-#include <net/pfvar.h>
#include <net/if_pflog.h>
#include <net/if_pfsync.h>
diff --git a/sys/netpfil/pf/pf_ioctl.c b/sys/netpfil/pf/pf_ioctl.c
--- a/sys/netpfil/pf/pf_ioctl.c
+++ b/sys/netpfil/pf/pf_ioctl.c
@@ -67,6 +67,7 @@
#include <sys/sysctl.h>
#include <sys/md5.h>
#include <sys/ucred.h>
+#include <sys/time.h>
#include <net/if.h>
#include <net/if_var.h>
@@ -74,7 +75,6 @@
#include <net/vnet.h>
#include <net/route.h>
#include <net/pfil.h>
-#include <net/pfvar.h>
#include <net/if_pfsync.h>
#include <net/if_pflog.h>
diff --git a/sys/sys/time.h b/sys/sys/time.h
--- a/sys/sys/time.h
+++ b/sys/sys/time.h
@@ -424,6 +424,16 @@
#define USEC_2_TICKS(u) max(1, (uint32_t)((hz == 1000) ? \
((u) / 1000) : ((uint64_t)(u) * (uint64_t)hz)/(uint64_t)1000000))
+#include <sys/stdint.h>
+
+static inline uint64_t
+SEC_TO_NSEC(uint64_t seconds)
+{
+ if (seconds > UINT64_MAX / 1000000000ULL)
+ return (UINT64_MAX);
+ return (seconds * 1000000000ULL);
+}
+
#endif
/* Operations on timespecs */
#define timespecclear(tvp) ((tvp)->tv_sec = (tvp)->tv_nsec = 0)

File Metadata

Mime Type
text/plain
Expires
Sat, Oct 31, 7:43 AM (8 h, 23 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41243511
Default Alt Text
D60971.1793432631.diff (1 KB)

Event Timeline