[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: flock fails on sparc-sun-solaris2.6
From: |
Simon Josefsson |
Subject: |
Re: flock fails on sparc-sun-solaris2.6 |
Date: |
Thu, 18 Dec 2008 18:16:31 +0100 |
User-agent: |
Gnus/5.110011 (No Gnus v0.11) Emacs/23.0.60 (gnu/linux) |
"Tom G. Christensen" <address@hidden> 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 <address@hidden>
* lib/flock.c: Use proper #if symbol in check. Reported by "Tom
G. Christensen" <address@hidden>.
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 */