aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--system/include/dlfcn.h4
-rw-r--r--system/include/libc/sys/unistd.h2
2 files changed, 5 insertions, 1 deletions
diff --git a/system/include/dlfcn.h b/system/include/dlfcn.h
index f3439c70..34a85289 100644
--- a/system/include/dlfcn.h
+++ b/system/include/dlfcn.h
@@ -1,5 +1,7 @@
+#ifdef __cplusplus
extern "C" {
+#endif
#define RTLD_LAZY 1
#define RTLD_NOW 2
@@ -11,5 +13,7 @@ void *dlsym(void *, const char *);
int dlclose(void *);
char *dlerror(void);
+#ifdef __cplusplus
}
+#endif
diff --git a/system/include/libc/sys/unistd.h b/system/include/libc/sys/unistd.h
index 952568a9..a285d8d1 100644
--- a/system/include/libc/sys/unistd.h
+++ b/system/include/libc/sys/unistd.h
@@ -216,7 +216,7 @@ _READ_WRITE_RETURN_TYPE _EXFUN(_write, (int __fd, const void *__buf, size_t __nb
int _EXFUN(_execve, (const char *__path, char * const __argv[], char * const __envp[] ));
#endif
-#if defined(__CYGWIN__) || defined(__rtems__) || defined(__sh__) || defined(__SPU__)
+#if defined(__CYGWIN__) || defined(__rtems__) || defined(__sh__) || defined(__SPU__) || defined(EMSCRIPTEN)
#if !defined(__INSIDE_CYGWIN__)
int _EXFUN(ftruncate, (int __fd, off_t __length));
int _EXFUN(truncate, (const char *, off_t __length));