ソースを参照

Hardening: Address blhc warning in the plugins/ directory

Christoph Biedl 9 年 前
コミット
71eebb9465

+ 12 - 2
debian/patches/build_hardening-flags.patch

@@ -17,13 +17,23 @@ Last-Update: 2015-12-04
  
 --- a/plugins/Makefile
 +++ b/plugins/Makefile
-@@ -1,7 +1,7 @@
+@@ -1,7 +1,8 @@
  CC	= gcc
  COPTS	= -O2 -g
 -CFLAGS	= $(COPTS) -I.. -I../../include -fPIC
 -LDFLAGS	= -shared
-+CFLAGS  = $(shell dpkg-buildflags --get CFLAGS) $(COPTS) -I.. -I../../include -fPIC
++CFLAGS	= $(shell dpkg-buildflags --get CFLAGS) $(COPTS) -I.. -I../../include -fPIC
++CPPFLAGS	= $(shell dpkg-buildflags --get CPPFLAGS)
 +LDFLAGS	= $(shell dpkg-buildflags --get LDFLAGS) -shared
  LDADD   = -lutil
  INSTALL	= install -o root
  prefix  = /usr/local
+@@ -16,7 +17,7 @@
+ all:	$(PLUGINS)
+ 
+ %.so: %.c
+-	$(CC) -o $@ $(LDFLAGS) $(CFLAGS) $^ $(LDADD)
++	$(CC) -o $@ $(LDFLAGS) $(CPPFLAGS) $(CFLAGS) $^ $(LDADD)
+ 
+ LIBDIR	?= $(DESTDIR)$(prefix)/lib/pptpd
+ 

+ 2 - 2
debian/patches/build_plugin.patch

@@ -5,9 +5,9 @@ Last-Update: 2015-08-24
 
 --- a/plugins/Makefile
 +++ b/plugins/Makefile
-@@ -18,7 +18,7 @@
+@@ -19,7 +19,7 @@
  %.so: %.c
- 	$(CC) -o $@ $(LDFLAGS) $(CFLAGS) $^ $(LDADD)
+ 	$(CC) -o $@ $(LDFLAGS) $(CPPFLAGS) $(CFLAGS) $^ $(LDADD)
  
 -LIBDIR	?= $(DESTDIR)$(prefix)/lib/pptpd
 +LIBDIR	= $(DESTDIR)$(prefix)/lib/pptpd