about summary refs log tree commit diff
path: root/time/ftime.c
diff options
context:
space:
mode:
Diffstat (limited to 'time/ftime.c')
-rw-r--r--time/ftime.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/time/ftime.c b/time/ftime.c
index 93f485bbf7..0bbd923d70 100644
--- a/time/ftime.c
+++ b/time/ftime.c
@@ -16,10 +16,22 @@
    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_32)
+
 #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
+attribute_compat_text_section
 ftime (struct timeb *timebuf)
 {
   struct timespec ts;
@@ -31,3 +43,6 @@ ftime (struct timeb *timebuf)
   timebuf->dstflag = 0;
   return 0;
 }
+compat_symbol (libc, __ftime, ftime, GLIBC_2_0);
+
+#endif