While compiling a C program in LINUX, I get the foll. error:
stream.h:1123: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'int'
stream.h:1124: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'mblk_t'
stream.h:1125: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'mblk_t'
Line 1123,1124 and 1125 are given below:
__STREAMS_EXTERN int adjmsg(mblk_t *mp, register ssize_t length);
__STREAMS_EXTERN mblk_t *allocb(size_t size, unsigned int priority);
__STREAMS_EXTERN mblk_t *copyb(register mblk_t *mp);
The C program includes a header file which in turn includes stream.h
Any idea how this can be solved?
It’s not really clear the context of your code but it seems to me that you’re using the OpenSSL library (or you’re doing copy & paste from that source code).
The
streams_fastcallmacro is defined in thekmem.hheader file. Did you include it? If you’re just doing copy & paste you simply have to add this lines before yourSTREAMS_EXTERNdefinition:Note:
streams_fastcallsounds like the Microsoft Specific (but widely used on Windows) calling convention named__fastcall. I guess they used that name because it usesthe
regparmattribute to specify that some arguments should be passed using registers instead of the stack and this is what__fastcalldefines (or simply because it’s simply faster! lol)