diff options
author | Dmitry Chagin <dchagin@FreeBSD.org> | 2021-06-29 17:17:16 +0000 |
---|---|---|
committer | Dmitry Chagin <dchagin@FreeBSD.org> | 2021-06-29 17:17:16 +0000 |
commit | 945accf502db0dd44522489857f461e29ef17d30 (patch) | |
tree | 35adf1a718e1a6f58aa4302630e1d568a42e6aff | |
parent | 615f22b2fb6d999005473abcb771c6bf25118dfe (diff) | |
download | src-945accf502db0dd44522489857f461e29ef17d30.tar.gz src-945accf502db0dd44522489857f461e29ef17d30.zip |
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
-rw-r--r-- | sys/compat/linuxkpi/common/src/linux_compat.c | 3 |
1 files changed, 2 insertions, 1 deletions
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, |