summaryrefslogtreecommitdiffstats
path: root/patches/klibc-module-init-tools-3.11/0001-klibc-klibc-lacks-getc_unlocked-so-use-getc-instead.patch
blob: bb64c73872744d8aa21e17f62c96b1f3ff0c839e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
From 4ddb4f7603d4db28599e22ee0cedd38121697dfb Mon Sep 17 00:00:00 2001
From: Marc Kleine-Budde <mkl@pengutronix.de>
Date: Thu, 29 Oct 2009 17:28:49 +0100
Subject: [PATCH] [klibc] klibc lacks getc_unlocked, so use getc instead

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
---
 index.c |    2 +-
 util.c  |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/index.c b/index.c
index d656c0f..4da7b05 100644
--- a/index.c
+++ b/index.c
@@ -288,7 +288,7 @@ static int read_char(FILE *in)
 	int ch;
 
 	errno = 0;
-	ch = getc_unlocked(in);
+	ch = getc(in);
 	if (ch == EOF)
 		read_error();
 	return ch;
diff --git a/util.c b/util.c
index 4df11e0..c1d42d9 100644
--- a/util.c
+++ b/util.c
@@ -23,7 +23,7 @@ char *getline_wrapped(FILE *file, unsigned int *linenum)
 	int i = 0;
 	char *buf = NOFAIL(malloc(size));
 	for(;;) {
-		int ch = getc_unlocked(file);
+		int ch = getc(file);
 
 		switch(ch) {
 		case EOF:
@@ -42,7 +42,7 @@ char *getline_wrapped(FILE *file, unsigned int *linenum)
 			return buf;
 
 		case '\\':
-			ch = getc_unlocked(file);
+			ch = getc(file);
 
 			if (ch == '\n') {
 				if (linenum)
-- 
1.6.5