changes so it will compile with glibc