"Tom G. Christensen" <t...@jupiterrise.com> writes: > Hello, > > Using Simons daily-build script I got this failure: > depbase=`echo flock.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\ > gcc -std=gnu99 -DHAVE_CONFIG_H -DEXEEXT=\"\" -DEXEEXT=\"\" > -DNO_XMALLOC -DEXEEXT=\"\" -I. -I.. -I../intl -D_REENTRANT -g -O2 -MT > flock.o -MD -MP -MF $depbase.Tpo -c -o flock.o flock.c &&\ > mv -f $depbase.Tpo $depbase.Po > flock.c:215:2: error: #error "This platform lacks flock function, and Gnulib > doesn't provide a replacement. This is a bug in Gnulib." > make[4]: *** [flock.o] Error 1 > > This seems to be caused by a bug in flock.c, it checks for HAVE_FLOCK_L_TYPE > but should actually check for HAVE_STRUCT_FLOCK_L_TYPE.
This one seems relatively obvious. Any objections to pushing the patch below? I'll do it in a day or so unless someone objects. /Simon 2008-12-18 Simon Josefsson <si...@josefsson.org> * lib/flock.c: Use proper #if symbol in check. Reported by "Tom G. Christensen" <t...@jupiterrise.com>. diff --git a/lib/flock.c b/lib/flock.c index 5aa7690..00315f0 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 @@ -210,10 +210,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 */