-1

Working on a project for class and I am getting an unknown type name 'EXTERN' error. I am creating system calls (which later will be accessed by library calls). For some reason, I cannot figure out why my mproc.h file is not cooperating when I try to run "make services" in usr/src/releasetools. Here is the error that I am getting :

In file included from do_getaccesslvl.c:2:
./mproc.h:16:1: error: unknown type name 'EXTERN'
EXTERN struct mproc {
^
./mproc.h:16:8: error: expected identifier or '('
EXTERN struct mproc {
       ^
do_getaccesslvl.c:12:16: error: incomplete definition of type 'struct mproc'
    return process->level;
           ~~~~~~~^

./proto.h:3:8: note: forward declaration of 'struct mproc' struct

mproc;

3 errors generated. *** Error code 1

Why would EXTERN be type name unknown? This "struct" was defined natively by Minix. I thought perhaps I corrupted something so I went back and reverted to a previous snapshot in Oracle Virtualbox, but the error persists. Any help would be greatly appreciated.

BobSki
  • 1,531
  • 2
  • 25
  • 61
  • Can you include a little more info? Is `EXTERN` a macro or did you mean `extern`? Is `struct mproc` a type definition? If so, show us the complete type definition. Do you have a specific `struct mproc` variable you are declaring, and want to reference externally, if so where are you declaring it? – MFisherKDX Oct 23 '17 at 19:24

1 Answers1

-1

Well, I figured it out. Sorry that I didn't add enough information. The error ended up being in my system call file, and was due to the order in which I included files. After changing the order of the included files, everything worked! Thank you for trying to help!

  • You could just delete this question, since you found the answer on your own and it's not very interesting. – jwdonahue Oct 24 '17 at 01:06