From 09c67774af1379b51a1ac802a25c07f00a45cf0f Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Fri, 7 Oct 2011 16:42:54 -0700 Subject: fix openjpeg --- system/include/libc/getopt.h | 6 ++++++ system/include/libc/machine/setjmp.h | 5 +++++ 2 files changed, 11 insertions(+) (limited to 'system/include/libc') diff --git a/system/include/libc/getopt.h b/system/include/libc/getopt.h index ba8da4a7..dd21deb6 100644 --- a/system/include/libc/getopt.h +++ b/system/include/libc/getopt.h @@ -117,6 +117,12 @@ extern "C" }; + /* XXX Emscripten */ + #define NO_ARG 0 + #define REQ_ARG 1 + #define OPT_ARG 2 + typedef struct option option_t; + /* While getopt.h is a glibc extension, the following are newlib extensions. * They are optionally included via the __need_getopt_newlib flag. */ diff --git a/system/include/libc/machine/setjmp.h b/system/include/libc/machine/setjmp.h index a4699651..d3f9bda3 100644 --- a/system/include/libc/machine/setjmp.h +++ b/system/include/libc/machine/setjmp.h @@ -269,6 +269,11 @@ _BEGIN_STD_C #define _JBLEN 0x44 #endif +#ifdef EMSCRIPTEN /* Not that this can actually work... */ +#define _JBLEN 20 +#define _JBTYPE unsigned short +#endif + #ifdef _JBLEN #ifdef _JBTYPE typedef _JBTYPE jmp_buf[_JBLEN]; -- cgit v1.2.3-18-g5258