memlimit.c: ignore sysconf() failures

When using qemu-arm, sysconf(_SC_PAGE_SIZE) returns an error
with an errno of ENOSYS.  This change ignores ENOSYS since
the result would be the same as when _SC_PAGE_SIZE was not
defined.  This makes scrypt work in cryptohome unittests.

The "right" solution is to add a new macro via configure that
wraps up the _SC_PAGE_SIZE test along with a compile-time test
for sysconf() to work.  It seems like overkill, but probably
the right move for upstreaming.

TEST=builds and cryptohome tests work under qemu-arm
BUG=chromium-os:38444
Signed-off-by: Will Drewry <wad@chromium.org>

Change-Id: Ic04d19b0d1553c4e57f562cdcee99e59b300f2e0
Reviewed-on: https://gerrit.chromium.org/gerrit/42579
Reviewed-by: Kees Cook <keescook@chromium.org>
Commit-Queue: Will Drewry <wad@chromium.org>
Tested-by: Will Drewry <wad@chromium.org>
1 file changed