diff --git a/sys/fs/procfs/procfs_map.c b/sys/fs/procfs/procfs_map.c index 0d413450d57f..2d3c17e5bfec 100644 --- a/sys/fs/procfs/procfs_map.c +++ b/sys/fs/procfs/procfs_map.c @@ -46,6 +46,9 @@ #include #include #include +#ifdef COMPAT_IA32 +#include +#endif #include #include @@ -59,15 +62,6 @@ #include #include -#ifdef COMPAT_IA32 -#include -#include -#include - -extern struct sysentvec ia32_freebsd_sysvec; -#endif - - #define MEBUFFERSIZE 256 /* @@ -104,8 +98,8 @@ procfs_doprocmap(PFS_FILL_ARGS) return (EOPNOTSUPP); #ifdef COMPAT_IA32 - if (curthread->td_proc->p_sysent == &ia32_freebsd_sysvec) { - if (p->p_sysent != &ia32_freebsd_sysvec) + if (curproc->p_sysent->sv_flags & SV_ILP32) { + if (!(p->p_sysent->sv_flags & SV_ILP32)) return (EOPNOTSUPP); wrap32 = 1; }