On Thu, Dec 06, 2001 at 08:39:47AM +0100, Lars Gullik Bjønnes wrote:
> Ben Stanley <[EMAIL PROTECTED]> writes:
> 
> | Please let me know if the attached patch fixes this problem.
> >
> | I also tried to fix the Solaris compile problem - Kayvan, could you
> | please test it?
> 
> I am pretty sure that this is not how we are going to solve this
> problem.

I don't like adding the POSIX level hack either.

How about this? (it compiles for me on Solaris).

Index: lyxsum.C
===================================================================
RCS file: /cvs/lyx/lyx-devel/src/support/lyxsum.C,v
retrieving revision 1.20
diff -u -r1.20 lyxsum.C
--- lyxsum.C    2001/12/03 01:11:05     1.20
+++ lyxsum.C    2001/12/06 16:52:22
@@ -40,7 +40,7 @@
        
        void * mm = mmap(0, info.st_size, PROT_READ,
                         MAP_PRIVATE, fd, 0);
-       if (mm == MAP_FAILED) {
+       if (mm == reinterpret_cast<void*>(MAP_FAILED)) {
                close(fd);
                return 0;
        }
@@ -52,7 +52,7 @@
        crc.process_block(beg, end);
        unsigned long result = crc.checksum();
        
-       munmap(mm, info.st_size);
+       munmap((caddr_t) mm, info.st_size);
        close(fd);
        
        return result;

Reply via email to