Re: librdmacm in rdma-core build warnings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Oct 2, 2017 at 8:54 PM, Jason Gunthorpe
<jgunthorpe@xxxxxxxxxxxxxxxxxxxx> wrote:
> On Mon, Oct 02, 2017 at 04:11:01PM +0000, Hefty, Sean wrote:
>> > [26/189] Building C object
>> > librdmacm/CMakeFiles/rspreload.dir/preload.c.o
>> > ../librdmacm/preload.c:818:9: warning: no previous prototype for
>> > ???readv??? [-Wmissing-prototypes]  ssize_t readv(int socket, const struct
>> > iovec *iov, int iovcnt)
>> >          ^~~~~
>> > ../librdmacm/preload.c:857:9: warning: no previous prototype for
>> > ???writev??? [-Wmissing-prototypes]  ssize_t writev(int socket, const
>> > struct iovec *iov, int iovcnt)
>>
>> Does including sys/uio.h fix this?
>
> Something like that is the right solution, probably caused by glibc
> changes not gcc changes...
>
> The prototype must come from glibc headers.

Thanks Sean and Jason.

It fixed the warnings, I'll send proper patch tomorrow once I'll be at
the office.

diff --git a/librdmacm/preload.c b/librdmacm/preload.c
index dfc23648..3ed0242e 100644
--- a/librdmacm/preload.c
+++ b/librdmacm/preload.c
@@ -51,6 +51,8 @@
 #include <stdlib.h>
 #include <stdio.h>

+#include <sys/uio.h>
+
 #include <rdma/rdma_cma.h>
 #include <rdma/rdma_verbs.h>
 #include <rdma/rsocket.h>

Thanks

>
> Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux