diff options
author | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2020-07-24 13:42:01 -0300 |
---|---|---|
committer | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2020-10-16 14:19:23 -0300 |
commit | 14633d3e568eb9770a7e5046eff257113e0453fb (patch) | |
tree | ee6ab6aabc91d2c0ac1bf5a349a00fffd19d5e8a /time/ftime.c | |
parent | 01f33a9acc8f02ae6a6dd1efe366c28c825af8a8 (diff) | |
download | glibc-14633d3e568eb9770a7e5046eff257113e0453fb.tar.gz glibc-14633d3e568eb9770a7e5046eff257113e0453fb.tar.xz glibc-14633d3e568eb9770a7e5046eff257113e0453fb.zip |
Move ftime to a compatibility symbol
It was made deprecated on 2.31, so it moves to compat symbol after two releases. It was also removed from exported symbol for riscv32 (since ABI will be supported on for 2.33). Checked on x86_64-linux-gnu and i686-linux-gnu. Reviewed-by: Lukasz Majewski <lukma@denx.de>
Diffstat (limited to 'time/ftime.c')
-rw-r--r-- | time/ftime.c | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/time/ftime.c b/time/ftime.c index 93f485bbf7..be3295ef76 100644 --- a/time/ftime.c +++ b/time/ftime.c @@ -16,11 +16,23 @@ License along with the GNU C Library; if not, see <https://www.gnu.org/licenses/>. */ -#include <sys/timeb.h> +#include <shlib-compat.h> + +#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_33) + #include <time.h> +struct timeb + { + time_t time; /* Seconds since epoch, as from `time'. */ + unsigned short int millitm; /* Additional milliseconds. */ + short int timezone; /* Minutes west of GMT. */ + short int dstflag; /* Nonzero if Daylight Savings Time used. */ + }; + int -ftime (struct timeb *timebuf) +attribute_compat_text_section +__ftime (struct timeb *timebuf) { struct timespec ts; __clock_gettime (CLOCK_REALTIME, &ts); @@ -31,3 +43,6 @@ ftime (struct timeb *timebuf) timebuf->dstflag = 0; return 0; } + +compat_symbol (libc, __ftime, ftime, GLIBC_2_0); +#endif |