Skip to content

Commit c5706c1

Browse files
committed
fix the complier error for 4.04
1 parent ee1d789 commit c5706c1

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

port/modules/machine/machine_pin.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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,
9292

9393
machine_pin_obj_t *pin = m_new_obj(machine_pin_obj_t);
9494
if (!pin) {
95-
mp_raise_OSError(ENOMEM);
95+
mp_raise_OSError(MP_ENOMEM);
9696
}
9797

9898
strncpy(pin->name, pin_name, sizeof(pin->name));

port/modules/modfile.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ STATIC mp_uint_t fdfile_write(mp_obj_t o_in, const void *buf, mp_uint_t size, in
8989
}
9090
#endif
9191
mp_int_t r = write(o->fd, buf, size);
92-
while (r == -1 && errno == EINTR) {
92+
while (r == -1 && errno == MP_EINTR) {
9393
if (MP_STATE_VM(mp_pending_exception) != MP_OBJ_NULL) {
9494
mp_obj_t obj = MP_STATE_VM(mp_pending_exception);
9595
MP_STATE_VM(mp_pending_exception) = MP_OBJ_NULL;

port/mpputsnport.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
2424
* THE SOFTWARE.
2525
*/
26-
26+
#include <stdio.h>
2727
#include <rtthread.h>
2828
#include <rtdevice.h>
2929

0 commit comments

Comments
 (0)