<pre style='margin:0'>
Christopher Nielsen (mascguy) pushed a commit to branch master
in repository macports-legacy-support.
</pre>
<p><a href="https://github.com/macports/macports-legacy-support/commit/68f34b72bc5f7b0b7121c0d5fd8cacf7cd1cfd5b">https://github.com/macports/macports-legacy-support/commit/68f34b72bc5f7b0b7121c0d5fd8cacf7cd1cfd5b</a></p>
<pre style="white-space: pre; background: #F8F8F8"><span style='display:block; white-space:pre;color:#808000;'>commit 68f34b72bc5f7b0b7121c0d5fd8cacf7cd1cfd5b
</span>Author: Fred Wright <fw@fwright.net>
AuthorDate: Sat Mar 1 12:55:02 2025 -0800
<span style='display:block; white-space:pre;color:#404040;'> Add manual packet test for SO_TIMESTAMP_CONTINUOUS.
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> This supplies the missing definitions to allow testing the secret
</span><span style='display:block; white-space:pre;color:#404040;'> SO_TIMESTAMP_CONTINUOUS option in 10.14+.
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> TESTED:
</span><span style='display:block; white-space:pre;color:#404040;'> Gets allowable failure in <10.14.
</span><span style='display:block; white-space:pre;color:#404040;'> Passes in 10.14+.
</span>---
Makefile | 3 +++
manual_tests/libtest_packet_cont.c | 16 ++++++++++++++++
2 files changed, 19 insertions(+)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/Makefile b/Makefile
</span><span style='display:block; white-space:pre;color:#808080;'>index 813fc0e..dc1d1b6 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/Makefile
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/Makefile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -409,6 +409,9 @@ $(TESTNAMEPREFIX)stat_ino32.o: $(TESTNAMEPREFIX)stat.c
</span> $(TESTNAMEPREFIX)stat_ino64.o: $(TESTNAMEPREFIX)stat.c
$(TESTNAMEPREFIX)stat_ino64_darwin.o: $(TESTNAMEPREFIX)stat.c
<span style='display:block; white-space:pre;background:#e0ffe0;'>+# The manual packet test includes the packet source
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+$(MANTESTPREFIX)libtest_packet_cont.o: $(TESTNAMEPREFIX)packet.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> # Provide a target for all "darwin_c" tests
$(XTESTRUNPREFIX)darwin_c_all: $(DARWINRUNS)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/manual_tests/libtest_packet_cont.c b/manual_tests/libtest_packet_cont.c
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 0000000..e4734f2
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/manual_tests/libtest_packet_cont.c
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,16 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+/*
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * Version of test_packet with secret SO_TIMESTAMP_CONTINUOUS enabled.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ *
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * This exists in 10.14+ kernels, but isn't defined for userspace.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+/* Definitions from xnu/bsd/sys/socket_private.h */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+/* With #ifndefs just in case some SDK decides to define them */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#ifndef SO_TIMESTAMP_CONTINUOUS
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define SO_TIMESTAMP_CONTINUOUS 0x40000 /* Continuous monotonic timestamp on rcvd dgram */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#ifndef SCM_TIMESTAMP_CONTINUOUS
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define SCM_TIMESTAMP_CONTINUOUS 0x07 /* timestamp (uint64_t) */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#include "../test/test_packet.c"
</span></pre><pre style='margin:0'>
</pre>