diff options
author | Jeff Johnston <jjohnstn@redhat.com> | 2019-08-19 18:01:45 -0400 |
---|---|---|
committer | Jeff Johnston <jjohnstn@redhat.com> | 2019-08-19 18:01:45 -0400 |
commit | b99887c4283f7b21428d21f98ae9f6fcf573c756 (patch) | |
tree | 17afedc32cda727728d62d1ae25c4fb837b244bc /libgloss | |
parent | f75aa67851513d546b840bc43a961785a090be5f (diff) | |
download | newlib-b99887c4283f7b21428d21f98ae9f6fcf573c756.zip newlib-b99887c4283f7b21428d21f98ae9f6fcf573c756.tar.gz newlib-b99887c4283f7b21428d21f98ae9f6fcf573c756.tar.bz2 |
Revert previous change to sys/stat.h and fix cris libgloss
- revert previous fix which altered sys/stat.h
- fix libgloss/cris/gensyscalls to undef st_atime, st_mtime,
and st_ctime macros which cannot be used with new_stat structure
Diffstat (limited to 'libgloss')
-rw-r--r-- | libgloss/cris/gensyscalls | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/libgloss/cris/gensyscalls b/libgloss/cris/gensyscalls index 3e2f9af..c36f284 100644 --- a/libgloss/cris/gensyscalls +++ b/libgloss/cris/gensyscalls @@ -60,6 +60,9 @@ EOF cat > fstat.c <<EOF $lu#include <string.h> #include <sys/stat.h> +#undef st_atime +#undef st_mtime +#undef st_ctime int _fstat (int fd, struct stat *buf) { @@ -81,9 +84,9 @@ _fstat (int fd, struct stat *buf) buf->st_size = ks.st_size; buf->st_blksize = ks.st_blksize; buf->st_blocks = ks.st_blocks; - buf->st_atime = ks.st_atime; - buf->st_mtime = ks.st_mtime; - buf->st_ctime = ks.st_ctime; + buf->st_atim.tv_sec = ks.st_atime; + buf->st_mtim.tv_sec = ks.st_mtime; + buf->st_ctim.tv_sec = ks.st_ctime; R (retval) EOF cat > getpid.c <<EOF @@ -216,6 +219,9 @@ EOF cat > stat.c <<EOF $lu#include <string.h> #include <sys/stat.h> +#undef st_atime +#undef st_mtime +#undef st_ctime int _stat (const char *path, struct stat *buf) { @@ -237,9 +243,9 @@ _stat (const char *path, struct stat *buf) buf->st_size = ks.st_size; buf->st_blksize = ks.st_blksize; buf->st_blocks = ks.st_blocks; - buf->st_atime = ks.st_atime; - buf->st_mtime = ks.st_mtime; - buf->st_ctime = ks.st_ctime; + buf->st_atim.tv_sec = ks.st_atime; + buf->st_mtim.tv_sec = ks.st_mtime; + buf->st_ctim.tv_sec = ks.st_ctime; R (retval) EOF cat > times.c <<EOF |