add extern c in ios and asprintf