nfs-utils/nfs-utils-page_size.patch
Cristian Rodríguez 8639375bda Accepting request 85881 from home:elvigia:branches:Base:System
- Fix build in arm, portability bug, applications MUST
  use sysconf(_SC_PAGESIZE) instead of constant PAGE_SIZE

OBS-URL: https://build.opensuse.org/request/show/85881
OBS-URL: https://build.opensuse.org/package/show/Base:System/nfs-utils?expand=0&rev=59
2011-10-01 15:41:09 +00:00

12 lines
466 B
Diff

--- utils/blkmapd/device-process.c.orig
+++ utils/blkmapd/device-process.c
@@ -296,7 +296,7 @@ decode_blk_volume(uint32_t **pp, uint32_
off_t stripe_unit = vol->param.bv_stripe_unit;
/* Check limitations imposed by device-mapper */
if ((stripe_unit & (stripe_unit - 1)) != 0
- || stripe_unit < (off_t) (PAGE_SIZE >> 9))
+ || stripe_unit < (off_t) (sysconf(_SC_PAGESIZE) >> 9))
return -EIO;
BLK_READBUF(p, end, 4);
READ32(vol->bv_vol_n);