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

Commit 53c0535c authored by Elliott Hughes's avatar Elliott Hughes Committed by android-build-merger
Browse files

Merge "fix copy large file issue over MTP on 32bit device"

am: 37d1715a

Change-Id: I70f3aea2d33d2ab77b342d37a0cece8cbbd9b289
parents 3f0b1d72 37d1715a
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -47,10 +47,10 @@ void work_func(void *) {
        CHECK(aiocbp->queued);
        int ret;
        if (aiocbp->read) {
            ret = TEMP_FAILURE_RETRY(pread(aiocbp->aio_fildes,
            ret = TEMP_FAILURE_RETRY(pread64(aiocbp->aio_fildes,
                    aiocbp->aio_buf, aiocbp->aio_nbytes, aiocbp->aio_offset));
        } else {
            ret = TEMP_FAILURE_RETRY(pwrite(aiocbp->aio_fildes,
            ret = TEMP_FAILURE_RETRY(pwrite64(aiocbp->aio_fildes,
               aiocbp->aio_buf, aiocbp->aio_nbytes, aiocbp->aio_offset));
        }
        {
@@ -139,7 +139,7 @@ int aio_suspend(struct aiocb *aiocbp[], int n,
    return 0;
}

void aio_prepare(struct aiocb *aiocbp, void* buf, size_t count, off_t offset) {
void aio_prepare(struct aiocb *aiocbp, void* buf, size_t count, off64_t offset) {
    aiocbp->aio_buf = buf;
    aiocbp->aio_offset = offset;
    aiocbp->aio_nbytes = count;
+2 −2
Original line number Diff line number Diff line
@@ -32,7 +32,7 @@ struct aiocb {
    int aio_fildes;
    void *aio_buf;

    off_t aio_offset;
    off64_t aio_offset;
    size_t aio_nbytes;

    // Used internally
@@ -61,7 +61,7 @@ int aio_error(const struct aiocb *);
ssize_t aio_return(struct aiocb *);

// Helper method for setting aiocb members
void aio_prepare(struct aiocb *, void*, size_t, off_t);
void aio_prepare(struct aiocb *, void*, size_t, off64_t);

#endif // POSIXASYNCIO_H