The branch main has been updated by dchagin:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=945accf502db0dd44522489857f461e29ef17d30

commit 945accf502db0dd44522489857f461e29ef17d30
Author:     Dmitry Chagin <[email protected]>
AuthorDate: 2021-06-29 17:17:16 +0000
Commit:     Dmitry Chagin <[email protected]>
CommitDate: 2021-06-29 17:17:16 +0000

    LinuxKPI: Use the proper API to determine the ABI of the running process.
    
    Reviewed by:            markj, hselasky, kib
    Differential Revision:  https://reviews.freebsd.org/D30924
    MFC after:              2 weeks
---
 sys/compat/linuxkpi/common/src/linux_compat.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/sys/compat/linuxkpi/common/src/linux_compat.c 
b/sys/compat/linuxkpi/common/src/linux_compat.c
index 217c4081c603..4e949cdb91c4 100644
--- a/sys/compat/linuxkpi/common/src/linux_compat.c
+++ b/sys/compat/linuxkpi/common/src/linux_compat.c
@@ -51,6 +51,7 @@ __FBSDID("$FreeBSD$");
 #include <sys/rwlock.h>
 #include <sys/mman.h>
 #include <sys/stack.h>
+#include <sys/sysent.h>
 #include <sys/time.h>
 #include <sys/user.h>
 
@@ -964,7 +965,7 @@ linux_file_ioctl_sub(struct file *fp, struct linux_file 
*filp,
                data = *(void **)data;
        }
 #if defined(__amd64__)
-       if (td->td_proc->p_elf_machine == EM_386) {
+       if (SV_PROC_FLAG(td->td_proc, SV_ILP32)) {
                /* try the compat IOCTL handler first */
                if (fop->compat_ioctl != NULL) {
                        error = -OPW(fp, td, fop->compat_ioctl(filp,
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/dev-commits-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to