8000 Merge pull request #28 from vext01/openbsd · micropython/micropython@6b03264 · GitHub
[go: up one dir, main page]

Skip to content

Commit 6b03264

Browse files
committed
Merge pull request #28 from vext01/openbsd
Make micropython build on OpenBSD.
2 parents 5d32983 + 33fefc7 commit 6b03264

File tree

4 files changed

+9
-5
lines changed

4 files changed

+9
-5
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ Additional components:
2828
The Unix version
2929
----------------
3030

31-
The "unix" part requires a standard Unix environment with gcc. It works
32-
only for 64-bit machines due to a small piece of x86-64 assembler for
33-
the exception handling.
31+
The "unix" part requires a standard Unix environment with gcc and GNU make.
32+
It works only for 64-bit machines due to a small piece of x86-64 assembler
33+
for the exception handling.
3434

3535
To build:
3636

py/asmx64.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@
77
#include "misc.h"
88
#include "asmx64.h"
99

10+
#if defined(__OpenBSD__)
11+
#define MAP_ANONYMOUS MAP_ANON
12+
#endif
13+
1014
/* all offsets are measured in multiples of 8 bytes */
1115
#define WORD_SIZE (8)
1216

unix/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ BUILD=build
33

44
CC = gcc
55
CFLAGS = -I. -I$(PYSRC) -Wall -Werror -ansi -std=gnu99 -Os -DUSE_READLINE #-DNDEBUG
6-
LDFLAGS = -lm
6+
LDFLAGS = -lm -ltermcap
77

88
SRC_C = \
99
main.c \

unix/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#include <stdint.h>
22
#include <stdio.h>
33
#include <string.h>
4-
#include <malloc.h>
4+
#include <stdlib.h>
55

66
#include "nlr.h"
77
#include "misc.h"

0 commit comments

Comments
 (0)
0