diff --git a/unix/ffi.c b/unix/ffi.c
index b40e9a4ee6190e526643478f6d21181cca0644dd..b83fc120a9e628802a01e530eca27f49ead9dd44 100644
--- a/unix/ffi.c
+++ b/unix/ffi.c
@@ -71,7 +71,7 @@ static ffi_type *get_ffi_type(mp_obj_t o_in)
 {
     if (MP_OBJ_IS_STR(o_in)) {
         uint len;
-        const byte *s = mp_obj_str_get_data(o_in, &len);
+        const char *s = mp_obj_str_get_data(o_in, &len);
         ffi_type *t = char2ffi_type(*s);
         if (t != NULL) {
             return t;