aboutsummaryrefslogtreecommitdiff
path: root/src/common/file_utils.c
diff options
context:
space:
mode:
authorMichael Paquier <michael@paquier.xyz>2020-06-30 13:26:11 +0900
committerMichael Paquier <michael@paquier.xyz>2020-06-30 13:26:11 +0900
commit324435eb14e4f41cd430f96c9b13ad9b160e45e4 (patch)
tree408cec9ee041f4132a9ecd0386875ab0b2509531 /src/common/file_utils.c
parentee0202d552791f14bc407ce299628ce8d50eebe3 (diff)
downloadpostgresql-324435eb14e4f41cd430f96c9b13ad9b160e45e4.tar.gz
postgresql-324435eb14e4f41cd430f96c9b13ad9b160e45e4.zip
Prevent compilation of frontend-only files in src/common/ with backend
Any frontend-only file of src/common/ should include a protection to prevent such code to be included in the backend compilation. fe_memutils.c and restricted_token.c have been doing that, while file_utils.c (since bf5bb2e) and logging.c (since fc9a62a) forgot it. Reviewed-by: Daniel Gustafsson Discussion: https://postgr.es/m/20200625080757.GI130132@paquier.xyz
Diffstat (limited to 'src/common/file_utils.c')
-rw-r--r--src/common/file_utils.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/common/file_utils.c b/src/common/file_utils.c
index 7584c1f2fb4..a2faafdf13a 100644
--- a/src/common/file_utils.c
+++ b/src/common/file_utils.c
@@ -12,6 +12,11 @@
*
*-------------------------------------------------------------------------
*/
+
+#ifndef FRONTEND
+#error "This file is not expected to be compiled for backend code"
+#endif
+
#include "postgres_fe.h"
#include <dirent.h>