自己解决了,怎么结帖啊?随便多进来几个人散分吧
在config.h加入一行
#define HAVE_GETHOSTBYNAME_R_GLIBC2_STYLE 1

解决方案 »

  1.   

    http://dev.mysql.com/doc/mysql/en/Compilation_problems.html
      

  2.   

    If you get a compilation error on Linux (for example, SuSE Linux 8.1 or Red Hat Linux 7.3) similar to the following one: libmysql.c:1329: warning: passing arg 5 of `gethostbyname_r' from
    incompatible pointer type
    libmysql.c:1329: too few arguments to function `gethostbyname_r'
    libmysql.c:1329: warning: assignment makes pointer from integer
    without a cast
    make[2]: *** [libmysql.lo] Error 1By default, the configure script attempts to determine the correct number of arguments by using g++ the GNU C++ compiler. This test yields wrong results if g++ is not installed. There are two ways to work around this problem: 
    Make sure that the GNU C++ g++ is installed. On some Linux distributions, the required package is called gpp; on others, it is named gcc-c++. 
    Use gcc as your C++ compiler by setting the CXX environment variable to gcc: export CXX="gcc"Please note that you need to run configure again afterward.