vcl: add separate fcntl64 ldp handler 35/28435/1
authorFlorin Coras <fcoras@cisco.com>
Wed, 29 Apr 2020 02:19:51 +0000 (02:19 +0000)
committerAndrew Yourtchenko <ayourtch@gmail.com>
Tue, 18 Aug 2020 08:50:04 +0000 (08:50 +0000)
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Idb81e2901398dd6ae94931c705a704c7b52bbb36
(cherry picked from commit d7586d50f68655631482f33a83a1fe6f4f21ff64)

src/vcl/ldp.c

index 15f5b07..304a70a 100644 (file)
@@ -477,13 +477,8 @@ 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;
@@ -543,6 +538,18 @@ fcntl (int fd, int cmd, ...)
   return rv;
 }
 
+int
+fcntl64 (int fd, int cmd, ...)
+{
+  va_list ap;
+  int rv;
+
+  va_start (ap, cmd);
+  rv = fcntl (fd, cmd, ap);
+  va_end (ap);
+  return rv;
+}
+
 int
 ioctl (int fd, unsigned long int cmd, ...)
 {