On Mi, 2010-11-24 at 18:48 +0000, David Bremner wrote: > Building syncevolution on s390 fails with an illegal pointer > conversion. I haven't had a chance to poke at this yet, but I'm > reporting it here in case Patrick has any clever ideas.
Attached is a patch. I'm a bit surprised that sysync::memSize is not the same as size_t, but anyway, the attached patch should translate between the two. Please review carefully (not tested). Can someone confirm that it compiles on s390? -- Best Regards, Patrick Ohly The content of this message is my personal opinion only and although I am an employee of Intel, the statements I make here in no way represent Intel's position on the issue, nor am I authorized to speak on behalf of Intel on this matter.
diff --git a/src/syncevo/SyncSource.h b/src/syncevo/SyncSource.h index 7029993..d38d5e8 100644 --- a/src/syncevo/SyncSource.h +++ b/src/syncevo/SyncSource.h @@ -1830,7 +1830,20 @@ class SyncSourceBlob : public virtual SyncSourceBase void **aBlkPtr, size_t *aBlkSize, size_t *aTotSize, bool aFirst, bool *aLast) { - return m_blob.ReadBlob(aID, aBlobID, aBlkPtr, aBlkSize, aTotSize, aFirst, aLast); + // Translate between sysync::memSize and size_t, which + // is different on s390 (or at least the compiler complains...). + sysync::memSize blksize, totsize; + sysync::TSyError err = m_blob.ReadBlob(aID, aBlobID, aBlkPtr, + aBlkSize ? &blksize : NULL, + aTotSize ? &totsize : NULL, + aFirst, aLast); + if (aBlkSize) { + *aBlkSize = blksize; + } + if (aTotSize) { + *aTotSize = totsize; + } + return err; } sysync::TSyError writeBlob(sysync::cItemID aID, const char *aBlobID, void *aBlkPtr, size_t aBlkSize,