summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2014-01-02 07:49:13 -0800
committerDamien George <damien.p.george@gmail.com>2014-01-02 07:49:13 -0800
commit6b032642ece5d56557beb21a3e712fb6538d979e (patch)
treed675f861dc19219335ae4b1d646eb9db219df5a9
parent5d32983cb78355446b97722448de00862c120e46 (diff)
parent33fefc74a57bf974e052cf8035fe81fdd2df8087 (diff)
downloadmicropython-6b032642ece5d56557beb21a3e712fb6538d979e.tar.gz
micropython-6b032642ece5d56557beb21a3e712fb6538d979e.zip
Merge pull request #28 from vext01/openbsd
Make micropython build on OpenBSD.
-rw-r--r--README.md6
-rw-r--r--py/asmx64.c4
-rw-r--r--unix/Makefile2
-rw-r--r--unix/main.c2
4 files changed, 9 insertions, 5 deletions
diff --git a/README.md b/README.md
index fc334a22ea..487c03f6d7 100644
--- a/README.md
+++ b/README.md
@@ -28,9 +28,9 @@ Additional components:
The Unix version
----------------
-The "unix" part requires a standard Unix environment with gcc. It works
-only for 64-bit machines due to a small piece of x86-64 assembler for
-the exception handling.
+The "unix" part requires a standard Unix environment with gcc and GNU make.
+It works only for 64-bit machines due to a small piece of x86-64 assembler
+for the exception handling.
To build:
diff --git a/py/asmx64.c b/py/asmx64.c
index 2c56f35c99..c542df5089 100644
--- a/py/asmx64.c
+++ b/py/asmx64.c
@@ -7,6 +7,10 @@
#include "misc.h"
#include "asmx64.h"
+#if defined(__OpenBSD__)
+#define MAP_ANONYMOUS MAP_ANON
+#endif
+
/* all offsets are measured in multiples of 8 bytes */
#define WORD_SIZE (8)
diff --git a/unix/Makefile b/unix/Makefile
index 17a680a13b..3ff32cd85c 100644
--- a/unix/Makefile
+++ b/unix/Makefile
@@ -3,7 +3,7 @@ BUILD=build
CC = gcc
CFLAGS = -I. -I$(PYSRC) -Wall -Werror -ansi -std=gnu99 -Os -DUSE_READLINE #-DNDEBUG
-LDFLAGS = -lm
+LDFLAGS = -lm -ltermcap
SRC_C = \
main.c \
diff --git a/unix/main.c b/unix/main.c
index 79fe1b5153..376dbc0c04 100644
--- a/unix/main.c
+++ b/unix/main.c
@@ -1,7 +1,7 @@
#include <stdint.h>
#include <stdio.h>
#include <string.h>
-#include <malloc.h>
+#include <stdlib.h>
#include "nlr.h"
#include "misc.h"