Index: LibVNCServer-0.8.2/libvncserver/Makefile.am
===================================================================
--- LibVNCServer-0.8.2.orig/libvncserver/Makefile.am
+++ LibVNCServer-0.8.2/libvncserver/Makefile.am
@@ -1,5 +1,5 @@
-AM_CFLAGS=-g -Wall -I $(top_srcdir)
+AM_CFLAGS=-g -Wall -I $(top_srcdir) $(CFLAGS_$@)
 
 if WITH_TIGHTVNC_FILETRANSFER
 TIGHTVNCFILETRANSFERHDRS=tightvnc-filetransfer/filelistinfo.h \
 	tightvnc-filetransfer/filetransfermsg.h \
@@ -32,8 +32,11 @@ if HAVE_LIBJPEG
 JPEGSRCS = tight.c
 endif
 endif
 
+CFLAGS_auth.o = $(CFLAGS) -fstack-protector
+CFLAGS_vncauth.o = $(CFLAGS) -fstack-protector
+
 LIB_SRCS = main.c rfbserver.c rfbregion.c auth.c sockets.c \
 	stats.c corre.c hextile.c rre.c translate.c cutpaste.c \
 	httpd.c cursor.c font.c \
 	draw.c selbox.c d3des.c vncauth.c cargs.c minilzo.c ultra.c scale.c \
Index: LibVNCServer-0.8.2/x11vnc/Makefile.am
===================================================================
--- LibVNCServer-0.8.2.orig/x11vnc/Makefile.am
+++ LibVNCServer-0.8.2/x11vnc/Makefile.am
@@ -1,5 +1,5 @@
-AM_CFLAGS = -I $(top_srcdir)
+AM_CFLAGS = -I $(top_srcdir) $(CFLAGS_$@)
 LDADD = ../libvncserver/libvncserver.a @WSOCKLIB@
 
 SUBDIRS = misc
 DIST_SUBDIRS = misc
@@ -10,8 +10,12 @@ EXTRA_DIST=ChangeLog README tkx11vnc $(m
 if CYGIPC
 LD_CYGIPC=-lcygipc
 endif
 
+CFLAGS_connections.o = $(CFLAGS) -fstack-protector
+CFLAGS_uinput.o = $(CFLAGS) -fstack-protector
+CFLAGS_userinput.o = $(CFLAGS) -fstack-protector
+
 if HAVE_X
 bin_PROGRAMS=x11vnc
 x11vnc_SOURCES = 8to24.c cleanup.c connections.c cursor.c gui.c help.c inet.c keyboard.c linuxfb.c options.c pm.c pointer.c rates.c remote.c scan.c screen.c selection.c solid.c sslcmds.c sslhelper.c uinput.c unixpw.c user.c userinput.c util.c v4l.c win_utils.c x11vnc.c x11vnc_defs.c xdamage.c xevents.c xinerama.c xkb_bell.c xrandr.c xrecord.c xwrappers.c 8to24.h allowed_input_t.h blackout_t.h cleanup.h connections.h cursor.h enums.h gui.h help.h inet.h keyboard.h linuxfb.h options.h params.h pm.h pointer.h rates.h remote.h scan.h screen.h scrollevent_t.h selection.h solid.h sslcmds.h sslhelper.h ssltools.h tkx11vnc.h uinput.h unixpw.h user.h userinput.h util.h v4l.h win_utils.h winattr_t.h x11vnc.h xdamage.h xevents.h xinerama.h xkb_bell.h xrandr.h xrecord.h xwrappers.h
 INCLUDES=@X_CFLAGS@
