File 0001-Avoid-namespace-collisions-with-getline-via-stdio.h.patch of Package safte-monitor
From 5f47a01406e131ea55d0c7dfdc45748369aec166 Mon Sep 17 00:00:00 2001
From: Andrew Basterfield <abasterfield@gmail.com>
Date: Mon, 9 Nov 2015 20:28:46 +0000
Subject: [PATCH 1/8] Avoid namespace collisions with getline via stdio.h
---
mathopd-1.3pl7-lite/request.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/mathopd-1.3pl7-lite/request.c b/mathopd-1.3pl7-lite/request.c
index e433d26..ea72df5 100644
--- a/mathopd-1.3pl7-lite/request.c
+++ b/mathopd-1.3pl7-lite/request.c
@@ -211,7 +211,7 @@ static char *rfctime(time_t t, char *buf)
return buf;
}
-static char *getline(struct pool *p)
+static char *__getline(struct pool *p)
{
register char *s;
char *olds, *sp, *end;
@@ -248,7 +248,7 @@ static char *getline(struct pool *p)
break;
}
}
- log_d("getline: fallen off the end");
+ log_d("__getline: fallen off the end");
return 0;
}
@@ -755,7 +755,7 @@ static int process_headers(struct request *r)
time_t i;
while (1) {
- l = getline(r->cn->input);
+ l = __getline(r->cn->input);
if (l == 0) {
return -1;
}
@@ -783,7 +783,7 @@ static int process_headers(struct request *r)
r->args = s + 1;
*s = 0;
}
- while ((l = getline(r->cn->input)) != 0) {
+ while ((l = __getline(r->cn->input)) != 0) {
s = strchr(l, ':');
if (s == 0)
continue;
--
2.38.0