diff -ur kea-Kea-3.2.0/src/bin/d2/d2_lexer.cc kea-modified/src/bin/d2/d2_lexer.cc
--- kea-Kea-3.2.0/src/bin/d2/d2_lexer.cc	Mon Jun 22 16:29:09 2026
+++ kea-modified/src/bin/d2/d2_lexer.cc	Mon Aug 31 07:10:15 2026
@@ -312,7 +312,7 @@
 
 /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
 
-#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
+#if defined(__OpenBSD__) || (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L)
 
 /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
  * if you want the limit (max/min) macros for int types. 
diff -ur kea-Kea-3.2.0/src/bin/dhcp4/dhcp4_lexer.cc kea-modified/src/bin/dhcp4/dhcp4_lexer.cc
--- kea-Kea-3.2.0/src/bin/dhcp4/dhcp4_lexer.cc	Mon Jun 22 16:29:09 2026
+++ kea-modified/src/bin/dhcp4/dhcp4_lexer.cc	Mon Aug 31 07:10:35 2026
@@ -312,7 +312,7 @@
 
 /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
 
-#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
+#if defined(__OpenBSD__) || (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L)
 
 /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
  * if you want the limit (max/min) macros for int types. 
diff -ur kea-Kea-3.2.0/src/bin/dhcp6/dhcp6_lexer.cc kea-modified/src/bin/dhcp6/dhcp6_lexer.cc
--- kea-Kea-3.2.0/src/bin/dhcp6/dhcp6_lexer.cc	Mon Jun 22 16:29:09 2026
+++ kea-modified/src/bin/dhcp6/dhcp6_lexer.cc	Mon Aug 31 09:11:24 2026
@@ -312,7 +312,7 @@
 
 /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
 
-#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
+#if defined(__OpenBSD__) || (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L)
 
 /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
  * if you want the limit (max/min) macros for int types. 
diff -ur kea-Kea-3.2.0/src/bin/netconf/netconf_lexer.cc kea-modified/src/bin/netconf/netconf_lexer.cc
--- kea-Kea-3.2.0/src/bin/netconf/netconf_lexer.cc	Mon Jun 22 16:29:09 2026
+++ kea-modified/src/bin/netconf/netconf_lexer.cc	Mon Aug 31 07:11:01 2026
@@ -312,7 +312,7 @@
 
 /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
 
-#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
+#if defined(__OpenBSD__) || (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L)
 
 /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
  * if you want the limit (max/min) macros for int types. 
diff -ur kea-Kea-3.2.0/src/lib/dhcp/pkt.cc kea-modified/src/lib/dhcp/pkt.cc
--- kea-Kea-3.2.0/src/lib/dhcp/pkt.cc	Mon Jun 22 16:29:09 2026
+++ kea-modified/src/lib/dhcp/pkt.cc	Sun Aug 30 18:21:23 2026
@@ -342,6 +342,15 @@
 }
 
 void
+Pkt::addPktEvent(const std::string& label, const struct bpf_timeval& tv) {
+    time_t time_t_secs = tv.tv_sec;
+    ptime timestamp = from_time_t(time_t_secs);
+    time_duration usecs(0, 0, 0, tv.tv_usec);
+    timestamp += usecs;
+    addPktEvent(label, timestamp);
+}
+
+void
 Pkt::addPktEvent(const std::string& label, const struct timeval& tv) {
     time_t time_t_secs = tv.tv_sec;
     ptime timestamp = from_time_t(time_t_secs);
diff -ur kea-Kea-3.2.0/src/lib/dhcp/pkt.h kea-modified/src/lib/dhcp/pkt.h
--- kea-Kea-3.2.0/src/lib/dhcp/pkt.h	Mon Jun 22 16:29:09 2026
+++ kea-modified/src/lib/dhcp/pkt.h	Sun Aug 30 19:59:59 2026
@@ -13,6 +13,7 @@
 #include <dhcp/hwaddr.h>
 #include <dhcp/classify.h>
 #include <hooks/callout_handle_associate.h>
+#include <net/bpf.h>
 
 #include <boost/date_time/posix_time/posix_time.hpp>
 #include <boost/shared_ptr.hpp>
@@ -540,6 +541,9 @@
     /// to be in UTC/microseconds.  Defaults to the current time.
     void addPktEvent(const std::string& label,
                      const boost::posix_time::ptime& timestamp = PktEvent::now());
+
+    void addPktEvent(const std::string& label,
+                     const struct bpf_timeval& tv);
 
     /// @brief Adds an event to the end of the event stack with the timestamp
     /// specified as a struct timeval.
diff -ur kea-Kea-3.2.0/src/lib/eval/lexer.cc kea-modified/src/lib/eval/lexer.cc
--- kea-Kea-3.2.0/src/lib/eval/lexer.cc	Mon Jun 22 16:29:09 2026
+++ kea-modified/src/lib/eval/lexer.cc	Mon Aug 31 07:11:11 2026
@@ -312,7 +312,7 @@
 
 /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
 
-#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
+#if defined(__OpenBSD__) || (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L)
 
 /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
  * if you want the limit (max/min) macros for int types. 
