openbsd-ports/print/cups/patches/patch-scheduler_log_c
ajacoutot c1f3074d18 Update to cups-1.5.2.
While here, create cups's printcap under /etc/cups/ because we are
running unpriviledged so we cannot touch /etc/printcap.
Tweak rc script accordingly.
2012-02-16 22:12:08 +00:00

25 lines
980 B
Plaintext

$OpenBSD: patch-scheduler_log_c,v 1.1 2012/02/16 22:12:08 ajacoutot Exp $
log.c:289: warning: passing argument 1 of 'localtime' from incompatible pointer type
--- scheduler/log.c.orig Mon Feb 6 13:30:19 2012
+++ scheduler/log.c Mon Feb 6 13:31:24 2012
@@ -235,6 +235,7 @@ char * /* O - Date/time string */
cupsdGetDateTime(struct timeval *t, /* I - Time value or NULL for current */
cupsd_time_t format) /* I - Format to use */
{
+ time_t tmp;
struct timeval curtime; /* Current time value */
struct tm *date; /* Date/time value */
static struct timeval last_time = { 0, 0 };
@@ -286,7 +287,8 @@ cupsdGetDateTime(struct timeval *t, /* I - Time value
* (*BSD and Darwin store the timezone offset in the tm structure)
*/
- date = localtime(&(t->tv_sec));
+ tmp = t->tv_sec;
+ date = localtime (&tmp);
if (format == CUPSD_TIME_STANDARD)
snprintf(s, sizeof(s), "[%02d/%s/%04d:%02d:%02d:%02d %+03ld%02ld]",