mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2025-01-19 21:28:50 +00:00
d/v4l2: Use more portable sysconf(_SC_PAGESIZE)
This commit is contained in:
parent
765aec6ca1
commit
9c7c818637
|
@ -348,7 +348,8 @@ v4l2_setup_userptr_buffer(struct v4l2_fs *vid,
|
|||
struct v4l2_buffer *v_buf)
|
||||
{
|
||||
// align this to a memory page, v4l2 likes it that way
|
||||
void *ptr = aligned_alloc(getpagesize(), v_buf->length);
|
||||
long sz = sysconf(_SC_PAGESIZE);
|
||||
void *ptr = aligned_alloc(sz, v_buf->length);
|
||||
if (ptr == NULL) {
|
||||
V_ERROR(vid, "error: Could not alloc page-aligned memory!");
|
||||
return -1;
|
||||
|
|
Loading…
Reference in a new issue