[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: silo goes wrong



>>>>> "Davide" == Davide Barbieri <paci@chiara.dei.unipd.it> writes:

    Davide> Davide Barbieri wrote:
    >> Ciao, I've managed to compile silo with glibc, don't know how
    >> (uh, I have only run 'make', and the problem with __setjmp
    >> already defined in libc5 disappeared).
    >> 
    >> Now I cannot install silo, because:
    >> 
    >> "Fatal error: Cannot open superblock on /dev/sd"
    >> 
    >> (the reason is because /dev/sd result READ ONLY)
    >> 
    >> I'm working on it...

    Davide> the problem is in this two line, from silo.c:

    Davide> sprintf (spart, "/dev/sd%c%c", ((st1.st_dev & 0xf0) >> 4)
    Davide> + 'a', (st1.st_dev & 0xf) + '0'); sprintf (bootdev2,
    Davide> "/dev/sd%c1", ((st1.st_dev & 0xf0) >> 4) + 'a');

    Davide> the result is that spart="/dev/sd" and bootdev2="/dev/sd"

    Davide> obviously, there's no superblock on /dev/sd

    Davide> they should be something like /dev/sda1

    Davide> I think that those lines failed because st1 is a struct
    Davide> stat defined in sys/stat.h; stat.h include some F_IS*
    Davide> symbols, too, and they are already defined in linux/stat.h
    Davide> which is included from *fs.h used by silo. To make
    Davide> sys/stat.h and linux/stat.h coexists, I have added some
    Davide> #undef to silo sources, probably in the wrong way, causing
    Davide> that error.

    Davide> So, should I use <linux/stat.h> or <sys/stat.h>?

On my (i386) system, <linux/stat.h> is nothing but manifest constants
(preprocessor defines).  I'd say use <sys/stat.h>

Just add

#include <sys/stat.h>
#define _LINUX_STAT_H

ahead of the header that's including <linux/stat.h>.

-- 
Stephen
---
"Normality is a statistical illusion." -- me


--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-sparc-request@lists.debian.org . 
Trouble?  e-mail to templin@bucknell.edu .


Reply to: