openbsd-ports/print/cups/patches/patch-scheduler_log_c
ajacoutot e90b27a568 Major update to CUPS 1.6.1.
This package is now split between -main (the bloat) and -libs (i.e.
cups-libs; which only contains the base libraries which have no
external deps).
Most filters have moved to cups-filters, the split was needed because
cups depends on cups-filters which depends on cups

The nice side-effect is that this will simplify lots of things in tree.
2012-08-04 14:37:04 +00:00

25 lines
980 B
Plaintext

$OpenBSD: patch-scheduler_log_c,v 1.2 2012/08/04 14:37:04 ajacoutot Exp $
log.c:289: warning: passing argument 1 of 'localtime' from incompatible pointer type
--- scheduler/log.c.orig Thu Jan 5 06:50:57 2012
+++ scheduler/log.c Sat Feb 4 15:58:39 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]",