This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

There seems somethig wrong caused by macro __GNUC_PREREQ (maj, min)

Hi All

when i cross-compiled vsftpd,there were many errors such as follow.

arm-linux-gnueabihf-gcc -c ftppolicy.c -O2 -fPIE -fstack-protector --param=ssp-buffer-size=4 -Wall -W -Wshadow -Werror -Wformat-security -D_FORTIFY_SOURCE=2 -M  -idirafter dummyinc
In file included from ftppolicy.c:17:0:
/home/gd/ti-sdk-am335x-evm-06.00.00.00/linux-devkit/sysroots/i686-arago-linux/usr/bin/../arm-linux-gnueabihf/libc/usr/include/./sys/types.h:161:19: error: missing binary operator before token "("

I found out the error seems be caused by follow statements in feature.h

#if defined __GNUC__ && defined __GNUC_MINOR__
# define __GNUC_PREREQ (maj, min) \
    ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min))
#else
# define __GNUC_PREREQ(maj, min) 0
#endif

if i copy these statements before #if !__GNUC_PREREQ (2, 7) in types.h

it can be compiled correctly.

Why  the macro __GNUC_PREREQ (maj, min)  is not able to be found when it is located in feature.h?

How can i solve the problem?

by the way,the sdk used is linux-3.2.0-psp04.06.00.11,the linux is Ubuntu 12.0.4

Best Regards

Qin Long