diff --git a/firmware/include/file.h b/firmware/include/file.h index 2d5c9b88ab..1a43c6ad1d 100644 --- a/firmware/include/file.h +++ b/firmware/include/file.h @@ -22,12 +22,15 @@ #ifndef _FILE_H_ #define _FILE_H_ -#include -#include "_ansi.h" - #undef MAX_PATH /* this avoids problems when building simulator */ #define MAX_PATH 260 +#ifdef __PCTOOL__ +#include +#else +#include +#include "_ansi.h" + #define MAX_OPEN_FILES 11 #ifndef SEEK_SET @@ -97,3 +100,4 @@ extern off_t filesize(int fd); extern int release_files(int volume); int fdprintf (int fd, const char *fmt, ...) ATTRIBUTE_PRINTF(2, 3); #endif +#endif diff --git a/firmware/include/sys/types.h b/firmware/include/sys/types.h index 07f9e9c8c7..ecc25fd749 100644 --- a/firmware/include/sys/types.h +++ b/firmware/include/sys/types.h @@ -30,6 +30,9 @@ /* * include string.h for size_t for convinence */ #include +/* make some (debian, ubuntu...) systems happy that inappropriately include + * sys/types.h to get intN_t ... */ +#include #if !defined(__ssize_t_defined) && !defined(_SSIZE_T_) && !defined(ssize_t) && !defined(_SSIZE_T_DECLARED) #define __ssize_t_defined