mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-22 04:43:50 +00:00
Merge major BSD mutex and symbol conflict patches (bug #1816) (link patch still pending)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3273 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
10
cli.c
10
cli.c
@@ -181,8 +181,8 @@ static char *format_uptimestr(time_t timeval)
|
||||
char timestr[256];
|
||||
int pos = 0;
|
||||
#define SECOND (1)
|
||||
#define MIN (SECOND*60)
|
||||
#define HOUR (MIN*60)
|
||||
#define MINUTE (SECOND*60)
|
||||
#define HOUR (MINUTE*60)
|
||||
#define DAY (HOUR*24)
|
||||
#define WEEK (DAY*7)
|
||||
#define YEAR (DAY*365)
|
||||
@@ -222,9 +222,9 @@ static char *format_uptimestr(time_t timeval)
|
||||
else
|
||||
pos += sprintf(timestr + pos, "1 hour, ");
|
||||
}
|
||||
if (timeval > MIN) {
|
||||
mins = (timeval / MIN);
|
||||
timeval -= (mins * MIN);
|
||||
if (timeval > MINUTE) {
|
||||
mins = (timeval / MINUTE);
|
||||
timeval -= (mins * MINUTE);
|
||||
if (mins > 1)
|
||||
pos += sprintf(timestr + pos, "%d minutes, ", mins);
|
||||
else if (mins > 0)
|
||||
|
||||
Reference in New Issue
Block a user