about summary refs log tree commit diff
path: root/io/lockf.c
diff options
context:
space:
mode:
Diffstat (limited to 'io/lockf.c')
-rw-r--r--io/lockf.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/io/lockf.c b/io/lockf.c
index c7cc6a60c0..7bf90c9b59 100644
--- a/io/lockf.c
+++ b/io/lockf.c
@@ -20,6 +20,7 @@
 #include <unistd.h>
 #include <fcntl.h>
 #include <errno.h>
+#include <string.h>
 
 /* lockf is a simplified interface to fcntl's locking facilities.  */
 
@@ -28,6 +29,8 @@ lockf (int fd, int cmd, off_t len)
 {
   struct flock fl;
 
+  memset ((char *) &fl, '\0', sizeof (fl));
+
   switch (cmd)
     {
     case F_TEST: