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