I think I figured out what was wrong, I forgot to #include <string.h>.