Socketプログラムのエラー

Geekなぺーじ:Linuxネットワークプログラミングに書いてあるプログラムをコンパイルしたらエラーが発生.

error: ‘memset’ was not declared in this scope
error: ‘close’ was not declared in this scope
error: ‘inet_addr’ was not declared in this scope

調べたら,memset,close,inet_addrはそれぞれstring.h,unistd.h,arpa/inet.hにあった.
とりあえずincludeしたら無事コンパイル通った.

#include <string.h>
#include <unistd.h>
#include <arpa/inet.h>