<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/e52642b6296833f8a5cd0545425ac61478627f1d">https://github.com/macports/macports-legacy-support/commit/e52642b6296833f8a5cd0545425ac61478627f1d</a></p>
<pre style="white-space: pre; background: #F8F8F8"><span style='display:block; white-space:pre;color:#808000;'>commit e52642b6296833f8a5cd0545425ac61478627f1d
</span>Author: Fred Wright <fw@fwright.net>
AuthorDate: Fri Jan 17 20:52:23 2025 -0800
<span style='display:block; white-space:pre;color:#404040;'> dirent.h: Fix scandir hack for non-POSIX.
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> Commit 55fd6e3 rearranged the scandir/alphasort hacks such that they
</span><span style='display:block; white-space:pre;color:#404040;'> could apply in the non-POSIX case, where the underlying functions are
</span><span style='display:block; white-space:pre;color:#404040;'> undefined, causing bad references in the header. This fixes that.
</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;'> Passes all tests, including darwin_c_full, which previously got
</span><span style='display:block; white-space:pre;color:#404040;'> warnings.
</span>---
include/dirent.h | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/include/dirent.h b/include/dirent.h
</span><span style='display:block; white-space:pre;color:#808080;'>index dab7566..8a8b23c 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/include/dirent.h
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/include/dirent.h
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -46,7 +46,11 @@ __MP__END_DECLS
</span>
#endif /* __MPLS_SDK_SUPPORT_ATCALLS__ */
<span style='display:block; white-space:pre;background:#ffe0e0;'>-/* new signature for scandir and alphasort (optionally) */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+/* New signature for scandir and alphasort (optionally) */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+/* These functions are non-POSIX, so avoid broken refs. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> #if __MPLS_SDK_SUPPORT_NEW_SCANDIR__
/*
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -142,6 +146,8 @@ __mpls_scandir(const char *dirname, struct dirent ***namelist,
</span>
#endif /* !__MPLS_SDK_SUPPORT_NEW_SCANDIR__ */
<span style='display:block; white-space:pre;background:#e0ffe0;'>+#endif /* !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> #endif /* __DARWIN_C_LEVEL >= 200809L */
/* Provide a testable condition for the scandir signature issue. */
</pre><pre style='margin:0'>
</pre>