mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-29 16:20:11 -04:00
dtoolutil: Work around odd Linux bug with lseek on a directory fd
Fixes #1140
This commit is contained in:
parent
ab4367ee7b
commit
addbc8a2e8
@ -333,7 +333,7 @@ seekoff(streamoff off, ios_seekdir dir, ios_openmode which) {
|
|||||||
// Posix case.
|
// Posix case.
|
||||||
{
|
{
|
||||||
off_t li = lseek(_fd, off, SEEK_END);
|
off_t li = lseek(_fd, off, SEEK_END);
|
||||||
if (li == (off_t)-1) {
|
if (li == (off_t)-1 || (sizeof(off_t) == 8 && li == 0x7fffffffffffffff)) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
new_pos = (size_t)li;
|
new_pos = (size_t)li;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user