Try adding -lrt to linking