diff --git a/include/sys/types.h b/include/sys/types.h index 25907de15..0eb415186 100644 --- a/include/sys/types.h +++ b/include/sys/types.h @@ -44,7 +44,11 @@ +/* off_t is also defined in unistd.h */ +#ifndef __HAVE_off_t +#define __HAVE_off_t typedef long int off_t; +#endif diff --git a/include/unistd.h b/include/unistd.h index e152f2e88..039775e65 100644 --- a/include/unistd.h +++ b/include/unistd.h @@ -49,6 +49,12 @@ #define STDOUT_FILENO 1 #define STDERR_FILENO 2 +/* We need off_t if sys/types is not included */ +#ifndef __HAVE_off_t +#define __HAVE_off_t +typedef long int off_t; +#endif + /*****************************************************************************/