git: 8c34edf18b23 - main - multimedia/libbluray: Fix build on 16-CURRENT

From: Cy Schubert <cy_at_FreeBSD.org>
Date: Thu, 11 Sep 2025 15:00:53 UTC
The branch main has been updated by cy:

URL: https://cgit.FreeBSD.org/ports/commit/?id=8c34edf18b2380c3a85338a8f27a8d66a27f2907

commit 8c34edf18b2380c3a85338a8f27a8d66a27f2907
Author:     Cy Schubert <cy@FreeBSD.org>
AuthorDate: 2025-09-11 15:00:07 +0000
Commit:     Cy Schubert <cy@FreeBSD.org>
CommitDate: 2025-09-11 15:00:49 +0000

    multimedia/libbluray: Fix build on 16-CURRENT
    
    src d549de769055 removed readdir_r(3) because it was never thread-safe.
    readdir_r(3) was deprecated in 2016.
---
 .../libbluray/files/patch-src_file_dir__posix.c    | 23 ++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/multimedia/libbluray/files/patch-src_file_dir__posix.c b/multimedia/libbluray/files/patch-src_file_dir__posix.c
new file mode 100644
index 000000000000..69a901214e37
--- /dev/null
+++ b/multimedia/libbluray/files/patch-src_file_dir__posix.c
@@ -0,0 +1,23 @@
+--- src/file/dir_posix.c.orig	2022-11-26 05:45:24.000000000 -0800
++++ src/file/dir_posix.c	2025-09-11 07:58:04.802880000 -0700
+@@ -26,6 +26,8 @@
+ #include "util/logging.h"
+ #include "util/strutl.h"
+ 
++#include <sys/param.h>
++
+ #include <stdlib.h>
+ #include <string.h>
+ #if defined(HAVE_DIRENT_H)
+@@ -74,7 +76,11 @@
+     int result;
+     struct dirent e;
+ 
++#if defined(__FreeBSD_version) && __FreeBSD_version >= 1600000
++    result = (int)readdir((DIR*)dir->internal);
++#else
+     result = readdir_r((DIR*)dir->internal, &e, &p_e);
++#endif
+     if (result) {
+         _error("Error reading directory", result, dir);
+         return -result;