On Mon, Nov 8, 2010 at 11:25 AM, Cyril Hrubis <[email protected]> wrote:
> Hi!
>> >> > > Following patch fixes obvious problems with cap_bounds compilation
>> >> > >
>> >> > > * CAP_LAST_CAP is defined in linux/capability.h => include it
>> >> > >
>> >> > > * remove int errno; definition
>> >> > >
>> >> > > * move #ifdef HAVE_SYS_CAPABILITY_H after int main(int argc, char
>> >> > > *argv[])
>> >> > > in check_pe.c
>> >> > >
>> >> > > * small typos and coding style
>> >> >
>> >> > Hi Cyril!
>> >> > Quick question -- why doesn't sys/capability.h build on
>> >> > linux/capability.h (in particular what OS did you run into this issue
>> >> > on)?
>> >>
>> >> You are right, the problem is that HAVE_SYS_CAPABILITY_H is not in
>> >> config.h even when libcap-devel is installed and headers are found
>> >> (there is only #define HAVE_LIBCAP 1).
>> >>
>> >
>> > Hmm, adding sys/capability.h into AC_CHECK_HEADERS() in configure.ac
>> > seem to fixed this. Still I have no idea why AC_CHECK_HEADER() in
>> > m4/ltp-cap.m4 hasn't exported HAVE_SYS_CAPABILITY_H.
>>
>> Probably because I forgot to remove the square brackets; give the
>> patch attached a shot and let me know how it goes...
>
> Nope, it looks like AC_CHECK_HEADER() does not set HAVE_* at all(1). So
> we need to change AC_HECK_HEADER() to AC_CHECK_HEADERS() in
> m4/ltp-cap.m4.
That's kind of lame :/... Could you try this patch instead please?
Thanks!
-Garrett
diff --git a/m4/ltp-cap.m4 b/m4/ltp-cap.m4
index 8b15a3a..410417e 100644
--- a/m4/ltp-cap.m4
+++ b/m4/ltp-cap.m4
@@ -26,7 +26,7 @@ dnl
AC_DEFUN([LTP_CHECK_CAPABILITY_SUPPORT],[
AH_TEMPLATE(HAVE_LIBCAP,
[Define to 1 if you have libcap-2 installed.])
-AC_CHECK_HEADER([sys/capability.h],[capability_header_prefix="sys"])
+AC_CHECK_HEADERS([sys/capability.h],[capability_header_prefix="sys"])
if test "x$capability_header_prefix" != x; then
AC_CHECK_LIB(cap,cap_compare,[cap_libs="-lcap"])
AC_CHECK_PROG(CAPSET,capset,capset)
------------------------------------------------------------------------------
The Next 800 Companies to Lead America's Growth: New Video Whitepaper
David G. Thomson, author of the best-selling book "Blueprint to a
Billion" shares his insights and actions to help propel your
business during the next growth cycle. Listen Now!
http://p.sf.net/sfu/SAP-dev2dev
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list