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

[OT] Need a little C programming help

My apology for taking up the groups time with an off-topic request for help. I 
don't think that this has anything at all to do with 64-bit processing. What 
I know about c programming wouldn't take me five minutes to tell, so I'm 
easily stumped by compiler error messages.

I have a very small c program that is running on our local AMD64 server, which 
is running an up to date Debian Sarge. I've compiled this program many times 
over the past year by simply typing `cc swrc.c` and then weeding out my many 
c errors.

This evening, I had to make very minor change to the program but when I 
attempted to compile I received the following error output:

cmr@gladsheim:~/tmp$ cc swrc.c
In file included from /usr/include/sys/types.h:219,
                 from /usr/include/stdlib.h:433,
                 from swrc.c:5:
/usr/include/sys/sysmacros.h: In function `main':
/usr/include/sys/sysmacros.h:43: error: nested function `gnu_dev_major' 
declared `extern'
/usr/include/sys/sysmacros.h:49: error: nested function `gnu_dev_minor' 
declared `extern'
/usr/include/sys/sysmacros.h:55: error: nested function `gnu_dev_makedev' 
declared `extern'

The reason I'm asking for help this time is that it appears that the errors 
are in one of the included libraries, rather in my own source code. My 
include statements are:

#include        <stdio.h>
#include        <unistd.h>
#include        <stdlib.h>
#include        <strings.h>
#include        <errno.h>

I would really appreciate someone telling me what I'm doing wrong, or at least 
giving me a hint!

Thanks in advance!

Debian 'Sarge': Registered Linux User #241964
"More laws, less justice." -- Marcus Tullius Ciceroca, 42 BC

Reply to: