Skip to content

Commit fa29288

Browse files
SandraLoosemoregithub-cygwin
authored andcommitted
Adjust nios2 and m68k semihosting for sys/stat.h changes.
Commit 72ff9ac caused st_atime, st_ctime, and st_mtime to be defined as macros. This collided with use of these identifiers as field names in struct gdb_stat (which represents the GDB RSP encoding of struct stat) in libgloss semihosting support for nios2 and m68k. This patch renames the affected fields of struct gdb_stat. Signed-off-by: Sandra Loosemore <[email protected]>
1 parent 7630c77 commit fa29288

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

libgloss/m68k/io-gdb.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,9 @@ __hosted_from_gdb_stat (const struct gdb_stat *gs,
9494
s->st_size = gs->st_size;
9595
s->st_blksize = gs->st_blksize;
9696
s->st_blocks = gs->st_blocks;
97-
s->st_atime = gs->st_atime;
98-
s->st_mtime = gs->st_mtime;
99-
s->st_ctime = gs->st_ctime;
97+
s->st_atime = gs->st_atim;
98+
s->st_mtime = gs->st_mtim;
99+
s->st_ctime = gs->st_ctim;
100100
}
101101

102102
void

libgloss/m68k/io.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,9 @@ struct gdb_stat {
5858
uint64_t st_size; /* total size, in bytes */
5959
uint64_t st_blksize; /* blocksize for filesystem I/O */
6060
uint64_t st_blocks; /* number of blocks allocated */
61-
gdb_time_t st_atime; /* time of last access */
62-
gdb_time_t st_mtime; /* time of last modification */
63-
gdb_time_t st_ctime; /* time of last change */
61+
gdb_time_t st_atim; /* time of last access */
62+
gdb_time_t st_mtim; /* time of last modification */
63+
gdb_time_t st_ctim; /* time of last change */
6464
};
6565

6666
struct gdb_timeval {

libgloss/nios2/io-gdb.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -106,9 +106,9 @@ __hosted_from_gdb_stat (const struct gdb_stat *gs,
106106
s->st_size = SWAP64 (gs->st_size);
107107
s->st_blksize = SWAP64 (gs->st_blksize);
108108
s->st_blocks = SWAP64 (gs->st_blocks);
109-
s->st_atime = SWAP32 (gs->st_atime);
110-
s->st_mtime = SWAP32 (gs->st_mtime);
111-
s->st_ctime = SWAP32 (gs->st_ctime);
109+
s->st_atime = SWAP32 (gs->st_atim);
110+
s->st_mtime = SWAP32 (gs->st_mtim);
111+
s->st_ctime = SWAP32 (gs->st_ctim);
112112
}
113113

114114
void

libgloss/nios2/io.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,9 @@ struct gdb_stat {
5757
uint64_t st_size; /* total size, in bytes */
5858
uint64_t st_blksize; /* blocksize for filesystem I/O */
5959
uint64_t st_blocks; /* number of blocks allocated */
60-
gdb_time_t st_atime; /* time of last access */
61-
gdb_time_t st_mtime; /* time of last modification */
62-
gdb_time_t st_ctime; /* time of last change */
60+
gdb_time_t st_atim; /* time of last access */
61+
gdb_time_t st_mtim; /* time of last modification */
62+
gdb_time_t st_ctim; /* time of last change */
6363
};
6464

6565
struct gdb_timeval {

0 commit comments

Comments
 (0)