e354a5
commit 75c51570c710aa9c6df6b7a1e131392e1408c63f
e354a5
Author: Florian Weimer <fweimer@redhat.com>
e354a5
Date:   Mon May 20 21:08:40 2019 +0200
e354a5
e354a5
    support: Expose sbindir as support_sbindir_prefix
e354a5
e354a5
diff --git a/support/Makefile b/support/Makefile
e354a5
index 6afaa6836c944398..65b16299573af1ed 100644
e354a5
--- a/support/Makefile
e354a5
+++ b/support/Makefile
e354a5
@@ -178,6 +178,7 @@ CFLAGS-support_paths.c = \
e354a5
 		-DINSTDIR_PATH=\"$(prefix)\" \
e354a5
 		-DLIBDIR_PATH=\"$(libdir)\" \
e354a5
 		-DBINDIR_PATH=\"$(bindir)\" \
e354a5
+		-DSBINDIR_PATH=\"$(sbindir)\" \
e354a5
 		-DROOTSBINDIR_PATH=\"$(rootsbindir)\"
e354a5
 
e354a5
 ifeq (,$(CXX))
e354a5
diff --git a/support/support.h b/support/support.h
e354a5
index 97d142e9b6f68188..121cc9e9b7c98ca6 100644
e354a5
--- a/support/support.h
e354a5
+++ b/support/support.h
e354a5
@@ -109,6 +109,8 @@ extern const char support_libdir_prefix[];
e354a5
 /* Corresponds to the install's bin/ directory.  */
e354a5
 extern const char support_bindir_prefix[];
e354a5
 /* Corresponds to the install's sbin/ directory.  */
e354a5
+extern const char support_sbindir_prefix[];
e354a5
+/* Corresponds to the install's sbin/ directory (without prefix).  */
e354a5
 extern const char support_install_rootsbindir[];
e354a5
 
e354a5
 extern ssize_t support_copy_file_range (int, off64_t *, int, off64_t *,
e354a5
diff --git a/support/support_paths.c b/support/support_paths.c
e354a5
index a37a0720dc7339f0..eb2390227433aa70 100644
e354a5
--- a/support/support_paths.c
e354a5
+++ b/support/support_paths.c
e354a5
@@ -65,6 +65,13 @@ const char support_bindir_prefix[] = BINDIR_PATH;
e354a5
 # error please -DBINDIR_PATH=something in the Makefile
e354a5
 #endif
e354a5
 
e354a5
+#ifdef SBINDIR_PATH
e354a5
+/* Corresponds to the install's bin/ directory.  */
e354a5
+const char support_sbindir_prefix[] = SBINDIR_PATH;
e354a5
+#else
e354a5
+# error please -DSBINDIR_PATH=something in the Makefile
e354a5
+#endif
e354a5
+
e354a5
 #ifdef ROOTSBINDIR_PATH
e354a5
 /* Corresponds to the install's sbin/ directory.  */
e354a5
 const char support_install_rootsbindir[] = ROOTSBINDIR_PATH;