diff --git a/libmaxsi/Makefile b/libmaxsi/Makefile
index 06a16d62..21d0589e 100644
--- a/libmaxsi/Makefile
+++ b/libmaxsi/Makefile
@@ -35,6 +35,7 @@ fdio.o \
stdio.o \
dir.o \
fddir-sortix.o \
+setjmp.o \
sortix-sound.o \
process.o \
thread.o \
diff --git a/libmaxsi/include/setjmp.h b/libmaxsi/include/setjmp.h
new file mode 100644
index 00000000..43abbcb1
--- /dev/null
+++ b/libmaxsi/include/setjmp.h
@@ -0,0 +1,44 @@
+/******************************************************************************
+
+ COPYRIGHT(C) JONAS 'SORTIE' TERMANSEN 2012.
+
+ This file is part of LibMaxsi.
+
+ LibMaxsi is free software: you can redistribute it and/or modify it under
+ the terms of the GNU Lesser General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
+
+ LibMaxsi is distributed in the hope that it will be useful, but WITHOUT ANY
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
+ more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with LibMaxsi. If not, see .
+
+ setjmp.h
+ Stack environment declarations.
+
+******************************************************************************/
+
+#ifndef _SETJMP_H
+#define _SETJMP_H 1
+
+#include
+
+__BEGIN_DECLS
+
+struct jmp_buf_struct
+{
+ int unused;
+};
+
+typedef struct jmp_buf_struct jmp_buf[1];
+
+void longjmp(jmp_buf env, int val);
+int setjmp(jmp_buf env);
+
+__END_DECLS
+
+#endif
diff --git a/libmaxsi/setjmp.c b/libmaxsi/setjmp.c
new file mode 100644
index 00000000..f525ff45
--- /dev/null
+++ b/libmaxsi/setjmp.c
@@ -0,0 +1,39 @@
+/******************************************************************************
+
+ COPYRIGHT(C) JONAS 'SORTIE' TERMANSEN 2012.
+
+ This file is part of LibMaxsi.
+
+ LibMaxsi is free software: you can redistribute it and/or modify it under
+ the terms of the GNU Lesser General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
+
+ LibMaxsi is distributed in the hope that it will be useful, but WITHOUT ANY
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
+ more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with LibMaxsi. If not, see .
+
+ setjmp.c
+ Stack environment declarations.
+
+******************************************************************************/
+
+#include
+#include
+#include
+
+void longjmp(jmp_buf env, int val)
+{
+ fprintf(stderr, "setjmp(3) and longjmp(3) are unimplemented, abort!\n");
+ abort();
+}
+
+int setjmp(jmp_buf env)
+{
+ return 0;
+}
+