explicitly include getopt.h
use thread_millisleep() from our own thread.h instead of
deprecated usleep()
added "int" return type to main()
in newer standards nanosleep() is in time.h, not unistd.h ?
fix warning about "qsort callback has wrong prototype"
mysql_client_server_protocol.h needed for setipaddress() prototype
zero out full buffer length, not just pointer size length
fixed main() prototype by adding "int" return type
use intptr_t instead of int for thread IDs to silence
"casting pointer to integer of different size" warnings

intptr_t is defined as long on 64bit platforms and
as int on platforms with 32bit pointers
unistd.h needed for sleep() prototype
use time_t for timestams (silences some warnings)
use size_t for buffer sizes (silences several warnings)
increment pointer, not value pointed at
gcc is not happy about /* ... /* ... */ comments ...