mirror of
https://git.libcamera.org/libcamera/libcamera.git
synced 2025-07-15 08:25:07 +03:00
libcamera: dma_buf_allocator: Work around lack of file seals in uClibc
uClibc doesn't provide the macros defining parameters for the file
sealing API. Define them manually as a work around.
Fixes: ea4baaacc3
("libcamera: DmaBufAllocator: Support allocating from /dev/udmabuf")
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
This commit is contained in:
parent
9f0d88695e
commit
48cb731d72
2 changed files with 12 additions and 0 deletions
|
@ -127,6 +127,14 @@ DmaBufAllocator::~DmaBufAllocator() = default;
|
|||
* \return True if the DmaBufAllocator is valid, false otherwise
|
||||
*/
|
||||
|
||||
/* uClibc doesn't provide the file sealing API. */
|
||||
#ifndef __DOXYGEN__
|
||||
#if not HAVE_FILE_SEALS
|
||||
#define F_ADD_SEALS 1033
|
||||
#define F_SEAL_SHRINK 0x0002
|
||||
#endif
|
||||
#endif
|
||||
|
||||
UniqueFD DmaBufAllocator::allocFromUDmaBuf(const char *name, std::size_t size)
|
||||
{
|
||||
/* Size must be a multiple of the page size. Round it up. */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue