I have been trying to compile netcat.c on AIX for some time (using the command make aix), but the compiler gives me some weird feedback such as :
“netcat.c”, line 117.12: 1506-275 (S) Unexpected text ‘int’ encountered.
when checked the file netcat.c at line 117, I would find the line (second line in code below):
#ifdef HAVE_BIND
extern int h_errno;
/* stolen almost wholesale from bsd herror.c */
even if I changed the int into char for the same of testing, save the file and re-run the command I get the same error
am I missing something in reading the error code?
If you’re using
xlc(especially older ones), it’s normally caused by declarations after statements, something like:You probably need to give us a little more context, such as 10 or so lines before the error line.
My advice would be to get
gccrunning on that box if you are using an older xlc. IBM makes some fine compilers now but the earlier ones weren’t so crash hot (in my opinion).