Re bug 14712, on my Linux (Ubuntu Hardy thingy) box, the man page for

lseek does indeed suggest inclusion of <sys/types.h>, as well as
<unistd.h>. Experimentation showed that ading <sys/types.h> didn't
hurt on Mac OS/X, so add both into compat.h -- hopefull this will
solve the bug.

--HG--
extra : convert_revision : svn%3Aeff31bef-be4a-0410-a8fe-e47997df2690/trunk%4077
issue20
tibs 2008-10-27 09:32:09 +00:00
rodzic 2112c26de3
commit 0a69aabc62
1 zmienionych plików z 5 dodań i 0 usunięć

Wyświetl plik

@ -103,6 +103,11 @@ typedef uint8_t byte;
// value. Unfortunately, Windows has off_t defined as being a long.
// For compatibility, therefore, we define a type that can be used on
// both Windows and Unix
// NB: On some systems, off_t is provided by unistd.h, but on some others
// it may also be necessary to explicitly include sys/types.h. We shall
// do both, here, for safety.
#include <sys/types.h>
#include <unistd.h>
typedef off_t offset_t;
#if defined(__linux__) && !defined(__USE_FILE_OFFSET64)