Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0161347a authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "libshmem: don't depend on unique_fd cast to int" into main

parents f73c1e1c b2d935c4
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -84,11 +84,11 @@ bool convertIMemoryToSharedFileRegion(const sp<IMemory>& mem,
            return false;
        }

        const int fd = fcntl(heap->getHeapID(), F_DUPFD_CLOEXEC, 0);
        if (fd < 0) {
        base::unique_fd fd(fcntl(heap->getHeapID(), F_DUPFD_CLOEXEC, 0));
        if (!fd.ok()) {
            return false;
        }
        result->fd.reset(base::unique_fd(fd));
        result->fd.reset(std::move(fd));
        result->size = size;
        result->offset = heap->getOffset() + offset;
        result->writeable = (heap->getFlags() & IMemoryHeap::READ_ONLY) == 0;