diff options
author | John Marino <marino@FreeBSD.org> | 2014-11-03 06:58:45 +0000 |
---|---|---|
committer | John Marino <marino@FreeBSD.org> | 2014-11-03 06:58:45 +0000 |
commit | dd29d7ed5492fe0acfb1af6897f4ffb1d3896ae7 (patch) | |
tree | 1f99f7cc8237887428fe0265188ea84fca982570 /sysutils/mcelog/files | |
parent | d92adc77b473042984f245ac7184773c0c5c5b38 (diff) |
Notes
Diffstat (limited to 'sysutils/mcelog/files')
-rw-r--r-- | sysutils/mcelog/files/patch-config.c | 28 |
1 files changed, 3 insertions, 25 deletions
diff --git a/sysutils/mcelog/files/patch-config.c b/sysutils/mcelog/files/patch-config.c index 1819629335be..5dae2b3cd4f3 100644 --- a/sysutils/mcelog/files/patch-config.c +++ b/sysutils/mcelog/files/patch-config.c @@ -1,5 +1,5 @@ ---- config.c.orig 2010-01-20 18:36:52.000000000 -0800 -+++ config.c 2012-09-22 02:32:52.718116009 -0700 +--- config.c.orig 2010-01-21 02:36:52 UTC ++++ config.c @@ -18,6 +18,9 @@ Author: Andi Kleen */ @@ -10,29 +10,7 @@ #include <stdio.h> #include <string.h> #include <ctype.h> -@@ -127,6 +130,21 @@ - return s; - } - -+#if defined(__FreeBSD__) && __FreeBSD_version < 800067 -+/* Provide a stub getline() for older versions of FreeBSD. */ -+static ssize_t getline(char **cp, size_t *lenp, FILE *f) -+{ -+ -+ if (*cp == NULL) { -+ *cp = malloc(4096); -+ *lenp = 4096; -+ } -+ if (fgets(*cp, *lenp, f) == NULL) -+ return (0); -+ return (strlen(*cp)); -+} -+#endif -+ - int parse_config_file(const char *fn) - { - FILE *f; -@@ -304,7 +322,12 @@ +@@ -304,7 +307,12 @@ int config_trigger(const char *header, c s = config_string(header, name); if (s) { /* no $PATH */ |