mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-28 00:21:52 +03:00
Update ntp_gettime for Linux.
The ntp_gettime implementation of NTP exports the tai field the kernel now produces. This requires an ABI change since the ntptimeval structure changed. Upstream kept the same name, there is nothing to do. This patch changes the ntptimeval structure but keeps the old ntp_gettime definition. A new ntp_gettimex function which is transparently invoked through the old name is introduced. This has the advantage that even object files can remain compatible. This wouldn't be the case if symbol versioning would be used to overload the name ntp_gettime.
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1999, 2002 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1999, 2002, 2009 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@ -16,8 +16,12 @@
|
||||
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||
02111-1307 USA. */
|
||||
|
||||
#define ntp_gettime ntp_gettime_redirect
|
||||
|
||||
#include <sys/timex.h>
|
||||
|
||||
#undef ntp_gettime
|
||||
|
||||
#ifndef MOD_OFFSET
|
||||
# define modes mode
|
||||
#endif
|
||||
@ -27,8 +31,7 @@ extern int INTUSE(__adjtimex) (struct timex *__ntx);
|
||||
|
||||
|
||||
int
|
||||
ntp_gettime (ntv)
|
||||
struct ntptimeval *ntv;
|
||||
ntp_gettime (struct ntptimeval *ntv)
|
||||
{
|
||||
struct timex tntx;
|
||||
int result;
|
||||
|
Reference in New Issue
Block a user