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