aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoland Dreier <rolandd@cisco.com>2006-05-24 16:25:02 +0000
committerRoland Dreier <rolandd@cisco.com>2006-11-09 19:57:06 -0800
commiteeaff909c0edf0870009c91762044c6fd1731ce7 (patch)
treee819b8d738ef9356fef816b7458dfdb748aaa6b4
parente9351ef948dd70aad4fbafbc1d4df724bd3e8e2c (diff)
downloadlibmthca-eeaff909c0edf0870009c91762044c6fd1731ce7.tar.gz
Fix build of libmthca against libibverbs 1.1
New libibverbs headers don't include <string.h> or <sysfs/libsysfs.h> implicitly, so libmthca should include them explicitly if it needs them. Signed-off-by: Roland Dreier <rolandd@cisco.com>
-rw-r--r--ChangeLog12
-rw-r--r--src/ah.c1
-rw-r--r--src/cq.c1
-rw-r--r--src/memfree.c1
-rw-r--r--src/mthca.c5
-rw-r--r--src/qp.c1
-rw-r--r--src/srq.c1
7 files changed, 22 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 95255c0..5b3237d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2006-05-24 Roland Dreier <rdreier@cisco.com>
+
+ * src/mthca.c: If <sysfs/libsysfs.h> is detected, include it
+ explicitly. This lets things build when sysfs headers are
+ installed on the build system even when building against
+ libibverbs 1.1 (which does not include sysfs headers implicitly).
+
+ * src/ah.c, src/cq.c, src/memfree.c, src/mthca.c, src/qp.c,
+ src/srq.c: Add include of <string.h>, since it may no long be
+ implicitly included from libsysfs headers when building with
+ libibverbs 1.1.
+
2006-05-24 Michael S. Tsirkin <mst@mellanox.co.il>
* src/srq.c (mthca_tavor_post_srq_recv): Fix posting of lists of
diff --git a/src/ah.c b/src/ah.c
index c42df1d..c13d2a5 100644
--- a/src/ah.c
+++ b/src/ah.c
@@ -39,6 +39,7 @@
#include <stdlib.h>
#include <netinet/in.h>
#include <pthread.h>
+#include <string.h>
#include "mthca.h"
diff --git a/src/cq.c b/src/cq.c
index 3b012d1..935fa27 100644
--- a/src/cq.c
+++ b/src/cq.c
@@ -42,6 +42,7 @@
#include <stdlib.h>
#include <pthread.h>
#include <netinet/in.h>
+#include <string.h>
#include <infiniband/opcode.h>
diff --git a/src/memfree.c b/src/memfree.c
index 0a65e72..ed8afe8 100644
--- a/src/memfree.c
+++ b/src/memfree.c
@@ -39,6 +39,7 @@
#include <stdlib.h>
#include <netinet/in.h>
#include <pthread.h>
+#include <string.h>
#include "mthca.h"
diff --git a/src/mthca.c b/src/mthca.c
index 1ba6597..fffd75c 100644
--- a/src/mthca.c
+++ b/src/mthca.c
@@ -43,6 +43,11 @@
#include <errno.h>
#include <sys/mman.h>
#include <pthread.h>
+#include <string.h>
+
+#ifdef HAVE_SYSFS_LIBSYSFS_H
+#include <sysfs/libsysfs.h>
+#endif
#ifndef HAVE_IBV_READ_SYSFS_FILE
#include <sys/types.h>
diff --git a/src/qp.c b/src/qp.c
index 7b3c943..7d6a423 100644
--- a/src/qp.c
+++ b/src/qp.c
@@ -40,6 +40,7 @@
#include <stdlib.h>
#include <netinet/in.h>
#include <pthread.h>
+#include <string.h>
#include "mthca.h"
#include "doorbell.h"
diff --git a/src/srq.c b/src/srq.c
index 639b9d7..ae33df3 100644
--- a/src/srq.c
+++ b/src/srq.c
@@ -39,6 +39,7 @@
#include <stdlib.h>
#include <netinet/in.h>
#include <pthread.h>
+#include <string.h>
#include "mthca.h"
#include "doorbell.h"