Skip to contentSkip to conversation

librdmacm: Fix compilation warnings

PATCH In review Leon Romanovsky 1 participant 2 messages Oct 3, 2017 – Oct 8, 2017 1 message not in the archive InfiniBand

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 librdmacm: Fix compilation warnings

Combination of glibc 2.26-4 and gcc 7.2.0-3 produces of following warnings at the compilation phase of rdma-core.

[24/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)

The simple addition of "sys/uio.h" proposed by Sean Hefty [1] with Jason Gunthrope support [2] fixes it.

[1] https://marc.info/?l=linux-rdma&m=150696066510225&w=2
[2] https://marc.info/?l=linux-rdma&m=150696688111945&w=2

Cc Sean Hefty <[email protected]>
Cc Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
---
 librdmacm/preload.c | 2 ++
 1 file changed, 2 insertions(+)
librdmacm/preload.c +2 -0
index dfc23648..3ed0242e 100644
@@ -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>

--
2.14.2

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

author Applied
#2 lore raw
In reply to a message not in the archive
Quoted 13 lines · Leon Romanovsky

Combination of glibc 2.26-4 and gcc 7.2.0-3 produces of following warnings at the compilation phase of rdma-core.

[24/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)

The simple addition of "sys/uio.h" proposed by Sean Hefty [1] with Jason Gunthrope support [2] fixes it.

Quoted 9 lines

[1] https://marc.info/?l=linux-rdma&m=150696066510225&w=2
[2] https://marc.info/?l=linux-rdma&m=150696688111945&w=2

Cc Sean Hefty <[email protected]>
Cc Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
---
 librdmacm/preload.c | 2 ++
 1 file changed, 2 insertions(+)

Thanks, applied.