diff --git a/config.lib b/config.lib
index 4b88c8d9be..69385ca5b7 100644
--- a/config.lib
+++ b/config.lib
@@ -882,7 +882,7 @@ make_cflags_and_ldflags() {
# Each debug level reduces the optimalization by a bit
if [ $enable_debug -ge 1 ]; then
- CFLAGS="$CFLAGS -g -D_DEBUG"
+ CFLAGS="$CFLAGS -g -D_DEBUG -D_FORTIFY_SOURCE=2"
if [ "$os" = "PSP" ]; then
CFLAGS="$CFLAGS -G0"
fi
diff --git a/projects/openttd_vs80.vcproj b/projects/openttd_vs80.vcproj
index a080171b57..401c10587a 100644
--- a/projects/openttd_vs80.vcproj
+++ b/projects/openttd_vs80.vcproj
@@ -2391,10 +2391,6 @@
RelativePath=".\..\src\yapf\nodelist.hpp"
>
-
-
diff --git a/projects/openttd_vs90.vcproj b/projects/openttd_vs90.vcproj
index efe1023b9f..d9b070cf0a 100644
--- a/projects/openttd_vs90.vcproj
+++ b/projects/openttd_vs90.vcproj
@@ -2388,10 +2388,6 @@
RelativePath=".\..\src\yapf\nodelist.hpp"
>
-
-
diff --git a/source.list b/source.list
index f9e9b19861..e211fe8a6e 100644
--- a/source.list
+++ b/source.list
@@ -547,7 +547,6 @@ network/core/udp.h
# YAPF
yapf/follow_track.hpp
yapf/nodelist.hpp
-yapf/track_dir.hpp
yapf/yapf.h
yapf/yapf.hpp
yapf/yapf_base.hpp
diff --git a/src/yapf/track_dir.hpp b/src/yapf/track_dir.hpp
deleted file mode 100644
index 1f9c547d1a..0000000000
--- a/src/yapf/track_dir.hpp
+++ /dev/null
@@ -1,8 +0,0 @@
-/* $Id$ */
-
-#ifndef TRACK_DIR_HPP
-#define TRACK_DIR_HPP
-
-#include "../openttd.h"
-
-#endif /* TRACK_DIR_HPP */
diff --git a/src/yapf/yapf.hpp b/src/yapf/yapf.hpp
index 61e409bb3d..82ee7bfa6c 100644
--- a/src/yapf/yapf.hpp
+++ b/src/yapf/yapf.hpp
@@ -3,10 +3,7 @@
#ifndef YAPF_HPP
#define YAPF_HPP
-
-
-#include "track_dir.hpp"
-
+#include "../openttd.h"
#include "../vehicle_base.h"
#include "../road_map.h"
#include "../tunnel_map.h"