projects
/
platform
/
upstream
/
cryptsetup.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Get page size should never fail (in the works case it fails later with wrong alignment).
[platform/upstream/cryptsetup.git]
/
lib
/
utils.c
diff --git
a/lib/utils.c
b/lib/utils.c
index
2231522
..
eef7891
100644
(file)
--- a/
lib/utils.c
+++ b/
lib/utils.c
@@
-30,7
+30,8
@@
unsigned crypt_getpagesize(void)
{
- return (unsigned)sysconf(_SC_PAGESIZE);
+ long r = sysconf(_SC_PAGESIZE);
+ return r < 0 ? DEFAULT_MEM_ALIGNMENT : r;
}
static int get_alignment(int fd)