Check for correct macro, code uses S_ISDIR().