From ae3930b089c68e718efdfcd0d5f6609279828680 Mon Sep 17 00:00:00 2001 From: joerg Date: Fri, 26 Oct 2012 20:29:15 +0000 Subject: Don't conflict with log from libm. --- sysutils/libirman/distinfo | 3 +- sysutils/libirman/patches/patch-lirmand.c | 65 +++++++++++++++++++++++++++++++ 2 files changed, 67 insertions(+), 1 deletion(-) create mode 100644 sysutils/libirman/patches/patch-lirmand.c (limited to 'sysutils/libirman') diff --git a/sysutils/libirman/distinfo b/sysutils/libirman/distinfo index 8abba47197f..d434c868a5b 100644 --- a/sysutils/libirman/distinfo +++ b/sysutils/libirman/distinfo @@ -1,5 +1,6 @@ -$NetBSD: distinfo,v 1.9 2009/02/13 22:18:01 abs Exp $ +$NetBSD: distinfo,v 1.10 2012/10/26 20:29:15 joerg Exp $ SHA1 (libirman-0.4.1c.tbz) = be8e734842d33da4f7d6949212479f693c925a12 RMD160 (libirman-0.4.1c.tbz) = 4ffeb2fd219df81051a8192ade02a7e39a3e0202 Size (libirman-0.4.1c.tbz) = 48911 bytes +SHA1 (patch-lirmand.c) = 0963825bbe9cca927ca87889ea7a1c0941e562ee diff --git a/sysutils/libirman/patches/patch-lirmand.c b/sysutils/libirman/patches/patch-lirmand.c new file mode 100644 index 00000000000..92f657a80fc --- /dev/null +++ b/sysutils/libirman/patches/patch-lirmand.c @@ -0,0 +1,65 @@ +$NetBSD: patch-lirmand.c,v 1.1 2012/10/26 20:29:15 joerg Exp $ + +--- lirmand.c.orig 2012-10-26 14:22:50.000000000 +0000 ++++ lirmand.c +@@ -63,30 +63,30 @@ char *progname = "lirmand"; + + int lirc = 0; /* file descriptor */ + int is_daemon = 0; +-FILE *log = NULL; ++FILE *my_log = NULL; + + FILE *open_log(void) + { + time_t t=time(NULL); + +- if (!log) { +- log = fopen(LIRMAND_LOGFILE, "a"); +- if (log) { +- fprintf(log, "%s started at %s\n", progname, ctime(&t)); ++ if (!my_log) { ++ my_log = fopen(LIRMAND_LOGFILE, "a"); ++ if (my_log) { ++ fprintf(my_log, "%s started at %s\n", progname, ctime(&t)); + } + } +- return log; ++ return my_log; + } + + void close_log(void) + { + time_t t = time(NULL); + +- if (log) { +- fprintf(log, "%s stopped at %s\n", progname, ctime(&t)); +- fclose(log); ++ if (my_log) { ++ fprintf(my_log, "%s stopped at %s\n", progname, ctime(&t)); ++ fclose(my_log); + } +- log = NULL; ++ my_log = NULL; + } + + +@@ -99,7 +99,7 @@ int debug_printf(char *format, ...) + return 0; + + va_start(va, format); +- ret = vfprintf(log, format, va); ++ ret = vfprintf(my_log, format, va); + va_end(va); + + return ret; +@@ -114,8 +114,8 @@ int eprintf(char *format, ...) + + va_start(va, format); + if (open_log()) { +- ret = fprintf(log, "error: "); +- ret += vfprintf(log, format, va); ++ ret = fprintf(my_log, "error: "); ++ ret += vfprintf(my_log, format, va); + } + if (!is_daemon) { + ret = fprintf(stderr, "%s: ", progname); -- cgit v1.2.3