1--- a/storage/connect/os.h
2+++ b/storage/connect/os.h
3@@ -2,13 +2,15 @@
4 #ifndef _OS_H_INCLUDED
5 #define _OS_H_INCLUDED
6
7-#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__) || defined(__APPLE__)
8+#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__) || defined(__APPLE__) || (defined(__linux__) && !defined(__GLIBC__))
9 typedef off_t off64_t;
10 #define lseek64(fd, offset, whence) lseek((fd), (offset), (whence))
11 #define open64(path, flags, mode)   open((path), (flags), (mode))
12 #define ftruncate64(fd, length)     ftruncate((fd), (length))
13+#ifndef O_LARGEFILE
14 #define O_LARGEFILE 0
15 #endif
16+#endif
17
18 #ifdef _AIX
19 #ifndef O_LARGEFILE
20