1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
|
From deb61897f0505a82bd26e7fa35b6923c1455732d Mon Sep 17 00:00:00 2001
From: Jiang Wenjiang <jiangwenjiang@huawei.com>
Date: Thu, 9 Aug 2018 08:22:24 +0800
Subject: [PATCH] Fix: modify makefile to adapt dmm
---
src/vcl.am | 17 +++++++++++++++--
src/vcl/ldp.c | 2 +-
2 files changed, 16 insertions(+), 3 deletions(-)
diff --git a/src/vcl.am b/src/vcl.am
index 89e1841..b09cacb 100644
--- a/src/vcl.am
+++ b/src/vcl.am
@@ -11,13 +11,18 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-lib_LTLIBRARIES += libvppcom.la libvcl_ldpreload.la
+lib_LTLIBRARIES += libvppcom.la libvcl_ldpreload.la libdmm_vcl.la
libvppcom_la_SOURCES =
libvcl_ldpreload_la_SOURCES =
+libdmm_vcl_la_SOURCES =
libvppcom_la_DEPENDENCIES = \
libsvm.la \
libvlibmemoryclient.la
+libdmm_vcl_la_DEPENDENCIES = \
+ libsvm.la \
+ libvlibmemoryclient.la \
+ libvcl_ldpreload.la
libvppcom_la_LIBADD = $(libvppcom_la_DEPENDENCIES) -lpthread -lrt -ldl
@@ -40,12 +45,20 @@ libvcl_ldpreload_la_SOURCES += \
vcl/ldp.c \
$(libvppcom_la_SOURCES)
+libdmm_vcl_la_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/../../../../release/include
+
+libdmm_vcl_la_LIBADD = $(libdmm_vcl_la_DEPENDENCIES) -lpthread -lrt -ldl
+
+libdmm_vcl_la_SOURCES += \
+ vcl/dmm_vcl_adpt.c \
+ $(libvcl_ldpreload_la_SOURCES)
+
nobase_include_HEADERS += \
vcl/ldp_socket_wrapper.h \
vcl/ldp_glibc_socket.h \
vcl/ldp.h
-noinst_PROGRAMS += \
+bin_PROGRAMS += \
vcl_test_server \
vcl_test_client \
sock_test_server \
diff --git a/src/vcl/ldp.c b/src/vcl/ldp.c
index d31cd2c..e386855 100644
--- a/src/vcl/ldp.c
+++ b/src/vcl/ldp.c
@@ -1669,7 +1669,7 @@ send (int fd, const void *buf, size_t n, int flags)
getpid (), fd, fd, func_str, sid, sid, buf, n, flags);
size = vppcom_session_sendto (sid, (void *) buf, n, flags, NULL);
- if (size != VPPCOM_OK)
+ if (size <= VPPCOM_OK)
{
errno = -size;
size = -1;
--
1.8.3.1
|