title: Linker warnings while building application against mysql-connector-c/libmysqlclient/mysql C API
body: <p>I am trying to build mysql-connector-c from source(per instructions <a href="http://dev.mysql.com/doc/refman/5.1/en/connector-c-building.html" rel="noreferrer">here</a>) and statically link against the library in my application. However I am getting the following warnings and I was wondering if anyone has any ideas as to why this is:</p>
  
  <pre><code>/path/to/lib/libmysqlclient.a(mf_pack.c.o): In function `unpack_dirname':
  mf_pack.c:(.text+0x90b): warning: Using 'getpwnam' in statically linked 
  applications requires at runtime the shared libraries from the glibc version 
  used for linking
  /path/to/lib/libmysqlclient.a(libmysql.c.o): In function `read_user_name':
  libmysql.c:(.text+0x2b06): warning: Using 'getpwuid' in statically linked 
  applications requires at runtime the shared libraries from the glibc version 
  used for linking
  /path/to/lib/libmysqlclient.a(mf_pack.c.o): In function `unpack_dirname':
  mf_pack.c:(.text+0x916): warning: Using 'endpwent' in statically linked 
  applications requires at runtime the shared libraries from the glibc version 
  used for linking
  /path/to/lib/libmysqlclient.a(client.c.o): In function `mysql_real_connect':
  client.c:(.text+0x305c): warning: Using 'getaddrinfo' in statically linked 
  applications requires at runtime the shared libraries from the glibc version 
  used for linking
  /path/to/lib/libmysqlclient.a(libmysql.c.o): In function `mysql_server_init':
  libmysql.c:(.text+0x2f9b): warning: Using 'getservbyname' in statically linked
  applications requires at runtime the shared libraries from the glibc version 
  used for linking
  </code></pre>
  
  <p>Here are some of the relevant args/flags:</p>
  
  <p>For building the library CMake is being passed in the following:</p>
  
  <p><code>-G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX=/path/to/my/install/root -DCMAKE_C_FLAGS="-m64" -DCMAKE_CXX_FLAGS="-m64"</code> </p>
  
  <p>For building the application:</p>
  
  <pre><code>CFLAGS := $(CFLAGS) -Werror -Wall -ggdb -gdwarf-2
  LDFLAGS := $(LDFLAGS) -static -ggdb -gdwarf-2
  </code></pre>