aboutsummaryrefslogtreecommitdiffstats
path: root/wsutil
diff options
context:
space:
mode:
Diffstat (limited to 'wsutil')
-rw-r--r--wsutil/pint.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/wsutil/pint.h b/wsutil/pint.h
index 80dd4e0d3e..02012537ee 100644
--- a/wsutil/pint.h
+++ b/wsutil/pint.h
@@ -137,4 +137,7 @@
((guint8*)(p))[3] = (guint8)((v) >> 0); \
}
+/* Subtract two guint32s with respect to wraparound */
+#define guint32_wraparound_diff(higher, lower) ((higher>lower)?(higher-lower):(higher+0xffffffff-lower+1))
+
#endif /* PINT_H */