summaryrefslogtreecommitdiff
path: root/apt-pkg/contrib
diff options
context:
space:
mode:
Diffstat (limited to 'apt-pkg/contrib')
-rw-r--r--apt-pkg/contrib/fileutl.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/apt-pkg/contrib/fileutl.h b/apt-pkg/contrib/fileutl.h
index f33f7804b..13e9c610f 100644
--- a/apt-pkg/contrib/fileutl.h
+++ b/apt-pkg/contrib/fileutl.h
@@ -23,6 +23,9 @@
#include <apt-pkg/macros.h>
#include <apt-pkg/aptconfiguration.h>
+#ifdef APT_PKG_EXPOSE_STRING_VIEW
+#include <apt-pkg/string_view.h>
+#endif
#include <string>
#include <vector>
@@ -89,6 +92,9 @@ class FileFd
char* ReadLine(char *To, unsigned long long const Size);
bool Flush();
bool Write(const void *From,unsigned long long Size);
+#ifdef APT_PKG_EXPOSE_STRING_VIEW
+ APT_HIDDEN bool Write(APT::StringView From) { return Write(From.data(), From.size()); }
+#endif
bool static Write(int Fd, const void *From, unsigned long long Size);
bool Seek(unsigned long long To);
bool Skip(unsigned long long To);