public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Cyril Hrubis <chrubis@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH] syscalls/clock_adjtime: Fix compiler error
Date: Thu, 11 Apr 2019 09:46:40 +0200	[thread overview]
Message-ID: <20190411074640.GA1498@rei> (raw)
In-Reply-To: <1554965824-2374-1-git-send-email-xuyang2018.jy@cn.fujitsu.com>

Hi!
> 'ADJ_OFFSET_SS_READ' 'ADJ_NANO' 'STA_NANO' and 'ADJ_MICRO' are not defined on
> some old distros, so add them into 'include/lapi/posix_clocks.h' to fix it.
> 
> These macros are introduced by the following commit:
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=52bfb36
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=eea83d8
> 
> sys_clock_adjtime are introduced by the following commit:
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=339dc50
> 
> Signed-off-by: Yang Xu <xuyang2018.jy@cn.fujitsu.com>
> ---
>  include/lapi/posix_clocks.h | 16 ++++++++++++++++
>  1 file changed, 16 insertions(+)
> 
> diff --git a/include/lapi/posix_clocks.h b/include/lapi/posix_clocks.h
> index b1f7a7c55..1d29107d8 100644
> --- a/include/lapi/posix_clocks.h
> +++ b/include/lapi/posix_clocks.h
> @@ -39,4 +39,20 @@
>  # define CLOCK_BOOTTIME_ALARM 9
>  #endif
>  
> +#ifndef ADJ_OFFSET_SS_READ
> +# define ADJ_OFFSET_SS_READ 0xa001
> +#endif
> +
> +#ifndef ADJ_NANO
> +# define ADJ_NANO 0x2000
> +#endif
> +
> +#ifndef STA_NANO
> +# define STA_NANO 0x2000
> +#endif
> +
> +#ifndef ADJ_MICRO
> +# define ADJ_MICRO 0x1000
> +#endif

Can we start a new header in the lapi called timex.h and put these
there? Other than that this looks good.

-- 
Cyril Hrubis
chrubis@suse.cz

  reply	other threads:[~2019-04-11  7:46 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-11  6:57 [LTP] [PATCH] syscalls/clock_adjtime: Fix compiler error Yang Xu
2019-04-11  7:46 ` Cyril Hrubis [this message]
2019-04-11  7:54   ` xuyang
2019-04-11  9:12   ` [LTP] [PATCH v2] " Yang Xu
2019-04-11 10:33     ` Cyril Hrubis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190411074640.GA1498@rei \
    --to=chrubis@suse.cz \
    --cc=ltp@lists.linux.it \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox