Hi Cyril,

Sorry to trouble you,
I just tried to build ltp code(the newest commit-id is 
20a99d7d4d4c202ebcc19c5ef17746735cbf9832) on Fedora-20 with 
glibc-2.18-14.fc20 & gcc-4.8.3-7.fc20, but hit below error:

------
make[4]: Entering directory 
`/home/zorro/git/upstream/ltp/testcases/kernel/syscalls/readlinkat'
gcc -g -O2 -g -O2 -fno-strict-aliasing -pipe -Wall -W -g -O2 
-Wold-style-definition -D_FORTIFY_SOURCE=2 
-I/home/zorro/git/upstream/ltp/testcases/kernel/include 
-I../../../../include -I../../../../include   -L../../../../lib 
readlinkat01.c   -lltp -o readlinkat01
In file included from ../../../../include/lapi/vmsplice.h:27:0,
                  from ../../../../include/lapi/fcntl.h:73,
                  from ../../../../include/lapi/readlinkat.h:24,
                  from readlinkat01.c:40:
../../../../include/lapi/iovec.h:26:8: error: redefinition of 'struct iovec'
  struct iovec {
         ^
In file included from /usr/include/bits/fcntl-linux.h:38:0,
                  from /usr/include/bits/fcntl.h:61,
                  from /usr/include/fcntl.h:35,
                  from readlinkat01.c:31:
/usr/include/bits/uio.h:43:8: note: originally defined here
  struct iovec
         ^
make[4]: *** [readlinkat01] Error 1
------

readlinkat01.c #include fcntl.h, fcntl.h will include something which 
define 'struct iovec'. And then readlinkat01.c #include 
lapi/readlinkat.h redefinition it.

I want to send to a patch modify this problem, but when I check commit 
id 4c256b39267c892c34549af522a6624cea448ca3, I don't know why you hope 
to add below code:
+#if !defined(HAVE_STRUCT_IOVEC)
+struct iovec {
+       void *iov_base;
+       size_t iov_len;
+};
+#else
+# include <sys/uio.h>
+#endif
+
+#endif /* IOVEC_H */


After check this code, I feel this will easy to cause redefinition of 
'struct iovec', when some .h file include uio.h indirectly. Due to I 
don't know what's your patch meaning, so I can't delete your struct 
iovec directly. I  hope you can help to find a better way to deal with 
this problem.

Thank you,
Zorro Lang



------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to