Hope someone can help trying to compile a cgi in C on FreeBSD (4.5)

The code compiles on other boxes no problem with the same gcc commands as below (it just lists names of tables as a test, I have not included the full code), but when compiling on this box it returns the following


No problem on thiss part
gcc -c -I/usr/local/include/mysql test2.c

Next line cause errors below
gcc -o test2.cgi test2.o -L/usr/local/lib/mysql -lmysqlclient

/usr/local/lib/mysql/libmysqlclient.so: warning: tempnam() possibly used unsafely; consider using mkstemp()
/usr/libexec/elf/ld: warning: libc.so.3, needed by /usr/local/lib/mysql/libmysqlclient.so, may conflict with libc.so.4
/usr/lib/libc.so.3: warning: mktemp() possibly used unsafely; consider using mkstemp()
/usr/lib/libc.so.3: warning: tmpnam() possibly used unsafely; consider using mkstemp()
/usr/lib/libc.so.3: warning: this program uses gets(), which is unsafe.
/usr/lib/libc.so.3: WARNING! setkey(3) not present in the system!
/usr/lib/libc.so.3: WARNING! des_setkey(3) not present in the system!
/usr/lib/libc.so.3: WARNING! encrypt(3) not present in the system!
/usr/lib/libc.so.3: WARNING! des_cipher(3) not present in the system!
/usr/lib/libc.so.3: warning: this program uses f_prealloc(), which is not recommended.

I do not know if there is something that needs to be changed on the box (I have no sysadmin privs) or if there is a way to compile around it