Distributor ID: Ubuntu
Description: Ubuntu 20.04.2 LTS
Release: 20.04
Codename: focal
mips64r5900el-ps2-elf-gcc -D_EE -O2 -G0 -Wall -I/usr/local/ps2dev/ps2sdk/ee/include -I/usr/local/ps2dev/ps2sdk/common/include -I. -I/usr/local/ps2dev/gsKit/include -I/usr/local/ps2dev/ps2sdk/ports/include -I/usr/local/ps2dev/ps2sdk/iop/include -c main.c -o main.o
In file included from /usr/local/ps2dev/ee/mips64r5900el-ps2-elf/sys-include/sys/stat.h:9,
from /usr/local/ps2dev/ee/mips64r5900el-ps2-elf/sys-include/sys/dirent.h:11,
from /usr/local/ps2dev/ee/mips64r5900el-ps2-elf/sys-include/dirent.h:39,
from main.c:1:
/usr/local/ps2dev/ee/mips64r5900el-ps2-elf/sys-include/time.h:56:1: error: unknown type name 'clock_t'; did you mean '_flock_t'?
56 | clock_t clock (void);
| ^~~~~~~
| _flock_t
In file included from /usr/local/ps2dev/ee/mips64r5900el-ps2-elf/sys-include/signal.h:6,
from /usr/local/ps2dev/ee/mips64r5900el-ps2-elf/sys-include/time.h:158,
from /usr/local/ps2dev/ee/mips64r5900el-ps2-elf/sys-include/sys/stat.h:9,
from /usr/local/ps2dev/ee/mips64r5900el-ps2-elf/sys-include/sys/dirent.h:11,
from /usr/local/ps2dev/ee/mips64r5900el-ps2-elf/sys-include/dirent.h:39,
from main.c:1:
/usr/local/ps2dev/ee/mips64r5900el-ps2-elf/sys-include/sys/signal.h:176:17: error: expected ')' before 'int'
176 | int kill (pid_t, int);
| ^~~~
| )
/usr/local/ps2dev/ee/mips64r5900el-ps2-elf/sys-include/sys/signal.h:180:19: error: expected ')' before 'int'
180 | int killpg (pid_t, int);
| ^~~~
| )
/usr/local/ps2dev/ee/mips64r5900el-ps2-elf/sys-include/sys/signal.h:226:29: error: expected ')' before 'int'
226 | int pthread_kill (pthread_t, int);
| ^~~~
| )
/usr/local/ps2dev/ee/mips64r5900el-ps2-elf/sys-include/sys/signal.h:237:21: error: expected ')' before 'int'
237 | int sigqueue (pid_t, int, const union sigval);
| ^~~~
| )
In file included from /usr/local/ps2dev/ee/mips64r5900el-ps2-elf/sys-include/sys/stat.h:9,
from /usr/local/ps2dev/ee/mips64r5900el-ps2-elf/sys-include/sys/dirent.h:11,
from /usr/local/ps2dev/ee/mips64r5900el-ps2-elf/sys-include/dirent.h:39,
from main.c:1:
/usr/local/ps2dev/ee/mips64r5900el-ps2-elf/sys-include/time.h:166:20: error: unknown type name 'clockid_t'
166 | int clock_settime (clockid_t clock_id, const struct timespec *tp);
| ^~~~~~~~~
/usr/local/ps2dev/ee/mips64r5900el-ps2-elf/sys-include/time.h:167:20: error: unknown type name 'clockid_t'
167 | int clock_gettime (clockid_t clock_id, struct timespec *tp);
| ^~~~~~~~~
/usr/local/ps2dev/ee/mips64r5900el-ps2-elf/sys-include/time.h:168:19: error: unknown type name 'clockid_t'
168 | int clock_getres (clockid_t clock_id, struct timespec *res);
| ^~~~~~~~~
/usr/local/ps2dev/ee/mips64r5900el-ps2-elf/sys-include/time.h:172:19: error: unknown type name 'clockid_t'
172 | int timer_create (clockid_t clock_id,
| ^~~~~~~~~
/usr/local/ps2dev/ee/mips64r5900el-ps2-elf/sys-include/time.h:174:2: error: unknown type name 'timer_t'; did you mean 'time_t'?
174 | timer_t *__restrict timerid);
| ^~~~~~~
| time_t
/usr/local/ps2dev/ee/mips64r5900el-ps2-elf/sys-include/time.h:178:19: error: unknown type name 'timer_t'; did you mean 'time_t'?
178 | int timer_delete (timer_t timerid);
| ^~~~~~~
| time_t
/usr/local/ps2dev/ee/mips64r5900el-ps2-elf/sys-include/time.h:182:20: error: unknown type name 'timer_t'; did you mean 'time_t'?
182 | int timer_settime (timer_t timerid, int flags,
| ^~~~~~~
| time_t
/usr/local/ps2dev/ee/mips64r5900el-ps2-elf/sys-include/time.h:185:20: error: unknown type name 'timer_t'; did you mean 'time_t'?
185 | int timer_gettime (timer_t timerid, struct itimerspec *value);
| ^~~~~~~
| time_t
/usr/local/ps2dev/ee/mips64r5900el-ps2-elf/sys-include/time.h:186:23: error: unknown type name 'timer_t'; did you mean 'time_t'?
186 | int timer_getoverrun (timer_t timerid);
| ^~~~~~~
| time_t
In file included from /usr/local/ps2dev/ee/mips64r5900el-ps2-elf/sys-include/sys/dirent.h:11,
from /usr/local/ps2dev/ee/mips64r5900el-ps2-elf/sys-include/dirent.h:39,
from main.c:1:
/usr/local/ps2dev/ee/mips64r5900el-ps2-elf/sys-include/sys/stat.h:29:3: error: unknown type name 'dev_t'
29 | dev_t st_dev;
| ^~~~~
/usr/local/ps2dev/ee/mips64r5900el-ps2-elf/sys-include/sys/stat.h:30:3: error: unknown type name 'ino_t'
30 | ino_t st_ino;
| ^~~~~
/usr/local/ps2dev/ee/mips64r5900el-ps2-elf/sys-include/sys/stat.h:31:3: error: unknown type name 'mode_t'
31 | mode_t st_mode;
| ^~~~~~
/usr/local/ps2dev/ee/mips64r5900el-ps2-elf/sys-include/sys/stat.h:32:3: error: unknown type name 'nlink_t'
32 | nlink_t st_nlink;
| ^~~~~~~
/usr/local/ps2dev/ee/mips64r5900el-ps2-elf/sys-include/sys/stat.h:33:3: error: unknown type name 'uid_t'
33 | uid_t st_uid;
| ^~~~~
/usr/local/ps2dev/ee/mips64r5900el-ps2-elf/sys-include/sys/stat.h:34:3: error: unknown type name 'gid_t'
34 | gid_t st_gid;
| ^~~~~
/usr/local/ps2dev/ee/mips64r5900el-ps2-elf/sys-include/sys/stat.h:35:3: error: unknown type name 'dev_t'
35 | dev_t st_rdev;
| ^~~~~
/usr/local/ps2dev/ee/mips64r5900el-ps2-elf/sys-include/sys/stat.h:36:3: error: unknown type name 'off_t'
36 | off_t st_size;
| ^~~~~
/usr/local/ps2dev/ee/mips64r5900el-ps2-elf/sys-include/sys/stat.h:45:3: error: unknown type name 'blksize_t'
45 | blksize_t st_blksize;
| ^~~~~~~~~
/usr/local/ps2dev/ee/mips64r5900el-ps2-elf/sys-include/sys/stat.h:46:3: error: unknown type name 'blkcnt_t'
46 | blkcnt_t st_blocks;
| ^~~~~~~~
/usr/local/ps2dev/ee/mips64r5900el-ps2-elf/sys-include/sys/stat.h:137:32: error: unknown type name 'mode_t'
137 | int chmod (const char *__path, mode_t __mode );
| ^~~~~~
/usr/local/ps2dev/ee/mips64r5900el-ps2-elf/sys-include/sys/stat.h:138:27: error: unknown type name 'mode_t'
138 | int fchmod (int __fd, mode_t __mode);
| ^~~~~~
/usr/local/ps2dev/ee/mips64r5900el-ps2-elf/sys-include/sys/stat.h:140:31: error: unknown type name 'mode_t'
140 | int mkdir (const char *_path, mode_t __mode );
| ^~~~~~
/usr/local/ps2dev/ee/mips64r5900el-ps2-elf/sys-include/sys/stat.h:141:33: error: unknown type name 'mode_t'
141 | int mkfifo (const char *__path, mode_t __mode );
| ^~~~~~
/usr/local/ps2dev/ee/mips64r5900el-ps2-elf/sys-include/sys/stat.h:143:1: error: unknown type name 'mode_t'
143 | mode_t umask (mode_t __mask );
| ^~~~~~
/usr/local/ps2dev/ee/mips64r5900el-ps2-elf/sys-include/sys/stat.h:143:15: error: unknown type name 'mode_t'
143 | mode_t umask (mode_t __mask );
| ^~~~~~
/usr/local/ps2dev/ee/mips64r5900el-ps2-elf/sys-include/sys/stat.h:151:34: error: unknown type name 'mode_t'
151 | int fchmodat (int, const char *, mode_t, int);
| ^~~~~~
/usr/local/ps2dev/ee/mips64r5900el-ps2-elf/sys-include/sys/stat.h:153:33: error: unknown type name 'mode_t'
153 | int mkdirat (int, const char *, mode_t);
| ^~~~~~
/usr/local/ps2dev/ee/mips64r5900el-ps2-elf/sys-include/sys/stat.h:154:34: error: unknown type name 'mode_t'
154 | int mkfifoat (int, const char *, mode_t);
| ^~~~~~
/usr/local/ps2dev/ee/mips64r5900el-ps2-elf/sys-include/sys/stat.h:155:33: error: unknown type name 'mode_t'
155 | int mknodat (int, const char *, mode_t, dev_t);
| ^~~~~~
/usr/local/ps2dev/ee/mips64r5900el-ps2-elf/sys-include/sys/stat.h:155:41: error: unknown type name 'dev_t'
155 | int mknodat (int, const char *, mode_t, dev_t);
| ^~~~~
make: *** [/usr/local/ps2dev/ps2sdk/samples/Makefile.eeglobal:31: main.o] Error 1
Basically all you need is to include the files in order to see this issue, I've attached a simple example project with this problem
example.zip