From 044b16f4e9ae773187f4fee8a9a0a54f9a51f13f Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 5 Aug 1997 23:36:21 +0000 Subject: update for 2.0.5pre1 --- io/lockf.c | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) (limited to 'io') diff --git a/io/lockf.c b/io/lockf.c index c391243e97..7bf90c9b59 100644 --- a/io/lockf.c +++ b/io/lockf.c @@ -1,25 +1,26 @@ -/* Copyright (C) 1994, 1996 Free Software Foundation, Inc. -This file is part of the GNU C Library. +/* Copyright (C) 1994, 1996, 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. -The GNU C Library is free software; you can redistribute it and/or -modify it under the terms of the GNU Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. -The GNU C Library is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Library General Public License for more details. + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #include #include #include #include +#include /* 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: -- cgit v1.2.3