Bladeren bron

fix the complier error for 4.04

supperthomas 4 jaren geleden
bovenliggende
commit
c5706c1a2c
3 gewijzigde bestanden met toevoegingen van 3 en 3 verwijderingen
  1. 1 1
      port/modules/machine/machine_pin.c
  2. 1 1
      port/modules/modfile.c
  3. 1 1
      port/mpputsnport.c

+ 1 - 1
port/modules/machine/machine_pin.c

@@ -92,7 +92,7 @@ mp_obj_t mp_pin_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw,
 
 
     machine_pin_obj_t *pin = m_new_obj(machine_pin_obj_t);
     machine_pin_obj_t *pin = m_new_obj(machine_pin_obj_t);
     if (!pin) {
     if (!pin) {
-        mp_raise_OSError(ENOMEM);
+        mp_raise_OSError(MP_ENOMEM);
     }
     }
 
 
     strncpy(pin->name, pin_name, sizeof(pin->name));
     strncpy(pin->name, pin_name, sizeof(pin->name));

+ 1 - 1
port/modules/modfile.c

@@ -89,7 +89,7 @@ STATIC mp_uint_t fdfile_write(mp_obj_t o_in, const void *buf, mp_uint_t size, in
     }
     }
     #endif
     #endif
     mp_int_t r = write(o->fd, buf, size);
     mp_int_t r = write(o->fd, buf, size);
-    while (r == -1 && errno == EINTR) {
+    while (r == -1 && errno == MP_EINTR) {
         if (MP_STATE_VM(mp_pending_exception) != MP_OBJ_NULL) {
         if (MP_STATE_VM(mp_pending_exception) != MP_OBJ_NULL) {
             mp_obj_t obj = MP_STATE_VM(mp_pending_exception);
             mp_obj_t obj = MP_STATE_VM(mp_pending_exception);
             MP_STATE_VM(mp_pending_exception) = MP_OBJ_NULL;
             MP_STATE_VM(mp_pending_exception) = MP_OBJ_NULL;

+ 1 - 1
port/mpputsnport.c

@@ -23,7 +23,7 @@
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  * THE SOFTWARE.
  * THE SOFTWARE.
  */
  */
-
+#include <stdio.h>
 #include <rtthread.h>
 #include <rtthread.h>
 #include <rtdevice.h>
 #include <rtdevice.h>