summaryrefslogtreecommitdiff
path: root/git-compat-util.h
diff options
context:
space:
mode:
Diffstat (limited to 'git-compat-util.h')
-rw-r--r--git-compat-util.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/git-compat-util.h b/git-compat-util.h
index 33b68e463c..7534db1267 100644
--- a/git-compat-util.h
+++ b/git-compat-util.h
@@ -258,6 +258,11 @@ static inline ssize_t xwrite(int fd, const void *buf, size_t len)
}
}
+static inline size_t xsize_t(off_t len)
+{
+ return (size_t)len;
+}
+
static inline int has_extension(const char *filename, const char *ext)
{
size_t len = strlen(filename);