Author: hselasky Date: Thu Mar 16 20:39:31 2017 New Revision: 315422 URL: https://svnweb.freebsd.org/changeset/base/315422
Log: Use __LP64__ to detect presence of suword64() to fix linking and loading of the LinuxKPI on 32-bit platforms. Reported by: lwhsu @ MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/compat/linuxkpi/common/src/linux_compat.c Modified: head/sys/compat/linuxkpi/common/src/linux_compat.c ============================================================================== --- head/sys/compat/linuxkpi/common/src/linux_compat.c Thu Mar 16 17:49:37 2017 (r315421) +++ head/sys/compat/linuxkpi/common/src/linux_compat.c Thu Mar 16 20:39:31 2017 (r315422) @@ -524,8 +524,15 @@ linux_clear_user(void *_uaddr, size_t _l /* zero 8 bytes at a time */ while (len > 7) { +#ifdef __LP64__ if (suword64(uaddr, 0)) return (_len); +#else + if (suword32(uaddr, 0)) + return (_len); + if (suword32(uaddr + 4, 0)) + return (_len); +#endif uaddr += 8; len -= 8; } _______________________________________________ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"