mirror of
git://sourceware.org/git/glibc.git
synced 2024-11-21 01:12:26 +08:00
pthread: Use 64 bit time_t stat internally for sem_open (BZ #28880)
The __sem_check_add_mapping internal stat calls fails with
EOVERFLOW if system time is larger than 32 bit.
It is a missing spot from 52a5fe70a2
fix to use 64 bit stat
internally.
Checked on x86_64-linux-gnu and i686-linux-gnu.
This commit is contained in:
parent
e108c02a5e
commit
894755e16e
@ -25,7 +25,7 @@
|
||||
struct inuse_sem
|
||||
{
|
||||
dev_t dev;
|
||||
ino_t ino;
|
||||
ino64_t ino;
|
||||
int refcnt;
|
||||
sem_t *sem;
|
||||
char name[];
|
||||
@ -34,7 +34,7 @@ struct inuse_sem
|
||||
struct search_sem
|
||||
{
|
||||
dev_t dev;
|
||||
ino_t ino;
|
||||
ino64_t ino;
|
||||
int refcnt;
|
||||
sem_t *sem;
|
||||
char name[NAME_MAX + 1];
|
||||
@ -77,8 +77,8 @@ __sem_check_add_mapping (const char *name, int fd, sem_t *existing)
|
||||
sem_t *result = SEM_FAILED;
|
||||
|
||||
/* Get the information about the file. */
|
||||
struct stat64 st;
|
||||
if (__fstat64 (fd, &st) == 0)
|
||||
struct __stat64_t64 st;
|
||||
if (__fstat64_time64 (fd, &st) == 0)
|
||||
{
|
||||
/* Get the lock. */
|
||||
lll_lock (sem_mappings_lock, LLL_PRIVATE);
|
||||
|
Loading…
Reference in New Issue
Block a user