diff options
author | Simon Josefsson <simon@josefsson.org> | 2008-12-18 19:30:16 +0100 |
---|---|---|
committer | Simon Josefsson <simon@josefsson.org> | 2008-12-18 19:30:16 +0100 |
commit | bdf01eb1c70d16bfaa72715b2c2a125be61eed85 (patch) | |
tree | 6109aa9d644cd955346835f00131d1ddd30386ca /lib/flock.c | |
parent | baee76d4b9c7a1fd7bc943ba1d2093d2175a35ca (diff) | |
download | gnulib-bdf01eb1c70d16bfaa72715b2c2a125be61eed85.tar.gz |
flock: Fix trivial mistakes.
Diffstat (limited to 'lib/flock.c')
-rw-r--r-- | lib/flock.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/flock.c b/lib/flock.c index 5aa7690bd8..01bfd17aa6 100644 --- a/lib/flock.c +++ b/lib/flock.c @@ -160,7 +160,7 @@ flock (int fd, int operation) #else /* !Windows */ -#ifdef HAVE_FLOCK_L_TYPE +#ifdef HAVE_STRUCT_FLOCK_L_TYPE /* We know how to implement flock in terms of fcntl. */ #ifdef HAVE_FCNTL_H @@ -171,6 +171,9 @@ flock (int fd, int operation) #include <unistd.h> #endif +#include <errno.h> +#include <string.h> + int flock (int fd, int operation) { @@ -210,10 +213,10 @@ flock (int fd, int operation) return r; } -#else /* !HAVE_FLOCK_L_TYPE */ +#else /* !HAVE_STRUCT_FLOCK_L_TYPE */ #error "This platform lacks flock function, and Gnulib doesn't provide a replacement. This is a bug in Gnulib." -#endif /* !HAVE_FLOCK_L_TYPE */ +#endif /* !HAVE_STRUCT_FLOCK_L_TYPE */ #endif /* !Windows */ |