Skip to content

Commit 4cca0de

Browse files
committed
header fixes for building python from source
1 parent 986d21a commit 4cca0de

File tree

4 files changed

+29
-2
lines changed

4 files changed

+29
-2
lines changed

system/include/libc/stdio.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -670,7 +670,7 @@ _ELIDABLE_INLINE int __sputc_r(struct _reent *_ptr, int _c, FILE *_p) {
670670
__swbuf_r(_REENT, (int)(x), p) == EOF : (*(p)->_p = (x), (p)->_p++, 0))
671671

672672
#define L_cuserid 9 /* posix says it goes in stdio.h :( */
673-
#ifdef __CYGWIN__
673+
#if defined(__CYGWIN__) || defined(EMSCRIPTEN)
674674
#define L_ctermid 16
675675
#endif
676676
#endif

system/include/libc/sys/resource.h

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,21 @@
99
struct rusage {
1010
struct timeval ru_utime; /* user time used */
1111
struct timeval ru_stime; /* system time used */
12-
int ru_maxrss; /* XXX Emscripten */
12+
/* XXX Emscripten */
13+
int ru_maxrss;
14+
int ru_ixrss;
15+
int ru_idrss;
16+
int ru_isrss;
17+
int ru_minflt;
18+
int ru_majflt;
19+
int ru_nswap;
20+
int ru_inblock;
21+
int ru_oublock;
22+
int ru_msgsnd;
23+
int ru_msgrcv;
24+
int ru_nsignals;
25+
int ru_nvcsw;
26+
int ru_nivcsw;
1327
};
1428

1529
/* XXX Emscripten */

system/include/libc/sys/termios.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,14 @@ __END_DECLS
262262

263263
#endif /* !KERNEL */
264264

265+
/* XXX Emscripten */
266+
struct winsize {
267+
unsigned short ws_row;
268+
unsigned short ws_col;
269+
unsigned short ws_xpixel;
270+
unsigned short ws_ypixel;
271+
};
272+
265273
/*
266274
* END OF PROTECTED INCLUDE.
267275
*/

system/include/sys/statvfs.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11

2+
#ifndef _SYS_STATVFS_H
3+
#define _SYS_STATVFS_H
4+
25
#ifdef __cplusplus
36
extern "C" {
47
#endif
@@ -23,3 +26,5 @@ int statvfs(char *path, struct statvfs *s);
2326
}
2427
#endif
2528

29+
#endif
30+

0 commit comments

Comments
 (0)