summaryrefslogtreecommitdiffstats
path: root/src/vcl/ldp.c
diff options
context:
space:
mode:
authorCarl Smith <carl.smith@alliedtelesis.co.nz>2019-11-13 14:37:39 +1300
committerFlorin Coras <florin.coras@gmail.com>2019-11-14 00:34:37 +0000
commite16707b5b2195fda47c1a3db7ba61f30055d2dbc (patch)
tree51e352b1512b134b7dc32b9a135a18bca4ae2740 /src/vcl/ldp.c
parent211b9f6ad3e2c4d1b54e85cebf062571ced969b2 (diff)
vcl: Handle newer Glibc (>2.28) where fcntl is actually fcntl64
Glibc 2.28 now provides fcntl64 which is used instead of fcntl by defining fcntl as fcntl64 in fcntl.h Type: fix Change-Id: I87fedfbf3e0d241aafdc920e90f824d71353e0e6 Signed-off-by: Carl Smith <carl.smith@alliedtelesis.co.nz>
Diffstat (limited to 'src/vcl/ldp.c')
-rw-r--r--src/vcl/ldp.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/vcl/ldp.c b/src/vcl/ldp.c
index 7aa38305249..e53a61e8e8c 100644
--- a/src/vcl/ldp.c
+++ b/src/vcl/ldp.c
@@ -482,8 +482,13 @@ writev (int fd, const struct iovec * iov, int iovcnt)
return size;
}
+#ifdef HAVE_FCNTL64
+int
+fcntl64 (int fd, int cmd, ...)
+#else
int
fcntl (int fd, int cmd, ...)
+#endif
{
vls_handle_t vlsh;
int rv = 0;
@@ -531,7 +536,11 @@ fcntl (int fd, int cmd, ...)
}
else
{
+#ifdef HAVE_FCNTL64
+ rv = libc_vfcntl64 (fd, cmd, ap);
+#else
rv = libc_vfcntl (fd, cmd, ap);
+#endif
}
va_end (ap);