diff options
author | Richard Yao <[email protected]> | 2017-04-09 15:00:03 -0400 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2017-04-12 08:57:46 -0700 |
commit | 281f1fa30ac3558d0e5e1573bdb9113291815bcd (patch) | |
tree | 86499fca64a3516b8ccafbcb5c4110810ffcf955 /lib/libspl/include | |
parent | bc482ac2ed80d77cf0186ccf670e02545f4ba883 (diff) |
Fix `zpool iostat -T d 1` on musl
When building on Gentoo against musl, GCC complains:
timestamp.c: In function ‘print_timestamp’:
timestamp.c:32:19: warning: passing argument 1 of ‘nl_langinfo’ makes
integer from pointer without a cast
#define _DATE_FMT "%+"
^
timestamp.c:47:21: note: in expansion of macro ‘_DATE_FMT’
fmt = nl_langinfo(_DATE_FMT);
^
The error was wrapped to meet comment style requirements.
This code is used by `zpool iostat -T d 1` to print a date and upon
testing it, I see no date printed. Lets use D_T_FMT so that something
gets printed and if D_T_FMT is not avaliable, then we can fall back to
"%+".
Reviewed-by: George Melikov <[email protected]>
Reviewed-by: loli10K <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: George Melikov <[email protected]>
Signed-off-by: Richard Yao <[email protected]>
Closes #5993
Diffstat (limited to 'lib/libspl/include')
0 files changed, 0 insertions, 0 deletions