Re: Compile Error
"Peter T. Breuer" <[email protected]>
| Newsgroups | gmane.linux.enbd.general |
|---|---|
| Message-ID | <[email protected]> |
I really hate it when elm tells me AFTER sending that it has converted
the message to MIME because of some 8-bit characters. So I will resend
...
-----------
"Also sprach David Bernick:"
> Compiling on FC4/Kernel 2.6.13/x86-64 Opteron. The patch applied
Patch? What/which patch? Can you elaborate a bit there?
Are you doing something other than the standard "make" in the
unarchived directory, maybe?
> In file included from drivers/block/enbd/enbd_base.c:282:
> include/linux/enbd.h: In function local_nbd_end_request:
> include/linux/enbd.h:437: error: invalid storage class for function rq_type
:-) I'd change that, then! As far as I can see, the declaration is
static inline int
rq_type (struct request *req)
in the c file. I don't know what your .h file contains, but mine says
the same:
static inline int rq_type(struct request *);
So change it to something else. Maybe your compiler doesn't like
"static inline"!
> include/linux/enbd.h: In function enbd_end_request:
> include/linux/enbd.h:479: error: invalid storage class for function rq_set_seqno
That's (in the c file)
static void
rq_set_seqno (struct request *req, unsigned long val)
which looks quite inoccuous to me. and in the .h file it is
static void rq_set_seqno(struct request *, unsigned long);
so that's consistent.
It looks to me as though your compiler has trouble with static inline
forward declarations at the head of code blocks. Move them outside. Or
change compiler.
Let me know what happens.
Peter
-----------
Is that clear? Fiddle with the declarations it complains about until
your compiler stops complaining, then tell me what you had to do.
And tell me what compiler it is. I use gcc 2.95.4 and have no problem.
As I recall some 3.x and 4.x gcc's from RH are stricter and stricter in
incompatible ways as to what they want. So the only defense is to find
out which wants what and put in some ifdefs.
Peter