summaryrefslogtreecommitdiffstats
path: root/patches/logrotate-3.9.1/0003-cpp-crossbuild.patch
blob: bf279af71cae569eb3a40efb1bf5b5fd3f8bc206 (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
From: unknown author <unknown.author@example.com>
Date: Thu, 11 Jun 2015 15:35:31 +0200
Subject: [PATCH] cpp-crossbuild

Patch from: NIIBE Yutaka <gniibe@fsij.org>

Cross-building logrotate with dpkg-cross, I encountered a problem.
dpkg-cross sets CPP variable, and compilation failures, because
the executable 'cpp' does not accept multiple input files.
---
 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index 5a42fb6b6a31..76f483a68fa0 100644
--- a/Makefile
+++ b/Makefile
@@ -130,7 +130,7 @@ clean:
 	rm -f ./test/test.ACL ./test/test.SELINUX ./test/error.log
 
 depend:
-	$(CPP) $(CFLAGS) -M $(SOURCES) > .depend
+	$(CC) -E $(CFLAGS) -M $(SOURCES) > .depend
 
 # pretest create the file ./test/test.ACL with
 # 0 or 1 according to the WITH_ACL=yes presence.