git: 003492f69b68 - 2025Q1 - emulators/qemu-user-static: fix build on main

From: Brooks Davis <brooks_at_FreeBSD.org>
Date: Mon, 17 Mar 2025 18:38:18 UTC
The branch 2025Q1 has been updated by brooks:

URL: https://cgit.FreeBSD.org/ports/commit/?id=003492f69b680b787b412ddc2dfd996ca9bc360d

commit 003492f69b680b787b412ddc2dfd996ca9bc360d
Author:     Brooks Davis <brooks@FreeBSD.org>
AuthorDate: 2025-02-20 21:45:56 +0000
Commit:     Brooks Davis <brooks@FreeBSD.org>
CommitDate: 2025-03-17 18:38:05 +0000

    emulators/qemu-user-static: fix build on main
    
    Call __sys___readlinkat() rather than the now removed __readlinkeat().
    Neither are public interfaces, but __sys___readlinkat is somewhat more
    so and is declared in libsys.h.
    
    Reported by:    cperciva
    MFH:            2025Q1
    Sponsored by:   DARPA, AFRL
    
    (cherry picked from commit 4afa6308d101da21a749701566c5088bc2c7041e)
---
 emulators/qemu-user-static/Makefile                           |  2 +-
 .../qemu-user-static/files/patch-bsd-user_freebsd_os-stat.h   | 11 +++++++++++
 2 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/emulators/qemu-user-static/Makefile b/emulators/qemu-user-static/Makefile
index 02ab9e4f2c05..9521422f9f6b 100644
--- a/emulators/qemu-user-static/Makefile
+++ b/emulators/qemu-user-static/Makefile
@@ -1,6 +1,6 @@
 PORTNAME=	qemu
 PORTVERSION=	3.1.0
-PORTREVISION=	14
+PORTREVISION=	15
 CATEGORIES=	emulators
 PKGNAMESUFFIX=	-user-static
 DIST_SUBDIR=	qemu/${PORTVERSION}
diff --git a/emulators/qemu-user-static/files/patch-bsd-user_freebsd_os-stat.h b/emulators/qemu-user-static/files/patch-bsd-user_freebsd_os-stat.h
new file mode 100644
index 000000000000..cec077643992
--- /dev/null
+++ b/emulators/qemu-user-static/files/patch-bsd-user_freebsd_os-stat.h
@@ -0,0 +1,11 @@
+--- bsd-user/freebsd/os-stat.h.orig
++++ bsd-user/freebsd/os-stat.h
+@@ -702,7 +702,7 @@
+         return -TARGET_EFAULT;
+     }
+ 
+-    ret = get_errno(__realpathat(arg1, p, b, arg4, arg5));
++    ret = get_errno(__sys___realpathat(arg1, p, b, arg4, arg5));
+     UNLOCK_PATH(p, arg2);
+     unlock_user(b, arg3, ret);
+