You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by sh...@apache.org on 2019/04/01 15:00:44 UTC

[trafficserver] branch master updated: Fix compile problems with PR-5211

This is an automated email from the ASF dual-hosted git repository.

shinrich pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/master by this push:
     new ab95cd7  Fix compile problems with PR-5211
ab95cd7 is described below

commit ab95cd7688ae624ff557980aa949e72b9ccaf984
Author: Susan Hinrichs <sh...@oath.com>
AuthorDate: Mon Apr 1 14:17:56 2019 +0000

    Fix compile problems with PR-5211
---
 include/ts/apidefs.h.in                              | 7 +++++++
 include/tscore/ink_defs.h                            | 9 ---------
 iocore/eventsystem/I_EventSystem.h                   | 1 +
 mgmt/api/NetworkUtilsRemote.h                        | 1 +
 plugins/experimental/ssl_session_reuse/src/config.cc | 3 ++-
 5 files changed, 11 insertions(+), 10 deletions(-)

diff --git a/include/ts/apidefs.h.in b/include/ts/apidefs.h.in
index 688e313..4841d56 100644
--- a/include/ts/apidefs.h.in
+++ b/include/ts/apidefs.h.in
@@ -1287,5 +1287,12 @@ typedef enum {
 typedef struct tsapi_uuid *TSUuid;
 
 #ifdef __cplusplus
+namespace ts
+{
+  static const int NO_FD = -1; ///< No or invalid file descriptor.
+}
+#endif
+
+#ifdef __cplusplus
 }
 #endif /* __cplusplus */
diff --git a/include/tscore/ink_defs.h b/include/tscore/ink_defs.h
index 251fcbf..1b81e79 100644
--- a/include/tscore/ink_defs.h
+++ b/include/tscore/ink_defs.h
@@ -130,12 +130,3 @@ int ink_login_name_max();
 // Get the hardware topology
 hwloc_topology_t ink_get_topology();
 #endif
-
-/** Constants.
- */
-#ifdef __cplusplus
-namespace ts
-{
-static const int NO_FD = -1; ///< No or invalid file descriptor.
-}
-#endif
diff --git a/iocore/eventsystem/I_EventSystem.h b/iocore/eventsystem/I_EventSystem.h
index 4675a5e..a062b5c 100644
--- a/iocore/eventsystem/I_EventSystem.h
+++ b/iocore/eventsystem/I_EventSystem.h
@@ -26,6 +26,7 @@
 #define _I_EventSystem_h
 
 #include "tscore/ink_platform.h"
+#include "ts/apidefs.h"
 
 #include "I_IOBuffer.h"
 #include "I_Action.h"
diff --git a/mgmt/api/NetworkUtilsRemote.h b/mgmt/api/NetworkUtilsRemote.h
index 31e8734..30f1a48 100644
--- a/mgmt/api/NetworkUtilsRemote.h
+++ b/mgmt/api/NetworkUtilsRemote.h
@@ -35,6 +35,7 @@
 #pragma once
 
 #include "mgmtapi.h"
+#include "ts/apidefs.h"
 #include "NetworkMessage.h"
 #include "EventCallback.h"
 
diff --git a/plugins/experimental/ssl_session_reuse/src/config.cc b/plugins/experimental/ssl_session_reuse/src/config.cc
index 9c3caf0..1aa089c 100644
--- a/plugins/experimental/ssl_session_reuse/src/config.cc
+++ b/plugins/experimental/ssl_session_reuse/src/config.cc
@@ -23,6 +23,7 @@
  */
 
 #include <ts/ts.h>
+#include <ts/apidefs.h>
 #include <cstring>
 #include <fcntl.h>
 #include <sys/types.h>
@@ -62,7 +63,7 @@ Config::loadConfig(const std::string &filename)
     size_t n = info.st_size;
     std::string config_data;
     config_data.resize(n);
-    if (read(fd, const_cast<char *>(config_data.data()), n) != n) {
+    if (read(fd, const_cast<char *>(config_data.data()), n) != static_cast<int>(n)) {
       close(fd);
       return success;
     }