Try to avoid parse_{time,units,flags} symbol conflicts
On Debian stretch systems PAM modules linked against Heimdal run into symbol conflicts with parse_time() in systemd libraries. We redefine parse_time() and friends to rk_parse_time(), ... while keeping the old names for ABI compatibility with existing clients. The legacy names should eventually be droppped.
This commit is contained in:

committed by
Nico Williams

parent
237cd892d9
commit
d73ec2510a
@@ -73,3 +73,32 @@ print_time_table (FILE *f)
|
||||
{
|
||||
print_units_table (time_units, f);
|
||||
}
|
||||
|
||||
#undef parse_time
|
||||
#undef unparse_time
|
||||
#undef unparse_time_approx
|
||||
#undef print_time_table
|
||||
|
||||
ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL
|
||||
parse_time(const char *s, const char *def_unit)
|
||||
{
|
||||
return rk_parse_units(s, time_units, def_unit);
|
||||
}
|
||||
|
||||
ROKEN_LIB_FUNCTION size_t ROKEN_LIB_CALL
|
||||
unparse_time(int t, char *s, size_t len)
|
||||
{
|
||||
return rk_unparse_units(t, time_units, s, len);
|
||||
}
|
||||
|
||||
ROKEN_LIB_FUNCTION size_t ROKEN_LIB_CALL
|
||||
unparse_time_approx(int t, char *s, size_t len)
|
||||
{
|
||||
return rk_unparse_units_approx(t, time_units, s, len);
|
||||
}
|
||||
|
||||
ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL
|
||||
print_time_table(FILE *f)
|
||||
{
|
||||
rk_print_units_table(time_units, f);
|
||||
}
|
||||
|
Reference in New Issue
Block a user