Skip to content

Commit 7926948

Browse files
forward declare aws_string to fix C++ builds. (#222)
* forward declare aws_string to fix C++ builds.
1 parent 9276b72 commit 7926948

File tree

6 files changed

+14
-5
lines changed

6 files changed

+14
-5
lines changed

CMakeLists.txt

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ include(AwsCheckHeaders)
3232
include(AwsSharedLibSetup)
3333
include(AwsSanitizers)
3434
include(AwsFindPackage)
35+
include(CTest)
3536

3637
option(BUILD_RELOCATABLE_BINARIES
3738
"Build Relocatable Binaries, this will turn off features that will fail on older kernels than used for the build."
@@ -219,7 +220,10 @@ install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-config.cmake"
219220
DESTINATION "${LIBRARY_DIRECTORY}/${PROJECT_NAME}/cmake/"
220221
COMPONENT Development)
221222

222-
include(CTest)
223-
if (BUILD_TESTING)
224-
add_subdirectory(tests)
225-
endif ()
223+
if (NOT CMAKE_CROSSCOMPILING)
224+
if (BUILD_TESTING)
225+
add_subdirectory(tests)
226+
endif()
227+
endif()
228+
229+

include/aws/io/tls_channel_handler.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@
1515
* permissions and limitations under the License.
1616
*/
1717
#include <aws/common/byte_buf.h>
18-
#include <aws/common/string.h>
1918

2019
#include <aws/io/io.h>
2120

2221
struct aws_channel_slot;
2322
struct aws_channel_handler;
23+
struct aws_string;
2424

2525
enum aws_tls_versions {
2626
AWS_IO_SSLv3,

source/darwin/secure_transport_tls_channel_handler.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
#include <aws/io/logging.h>
2222

2323
#include <aws/common/encoding.h>
24+
#include <aws/common/string.h>
2425
#include <aws/common/task_scheduler.h>
2526

2627
#include <AvailabilityMacros.h>

source/s2n/s2n_tls_channel_handler.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
#include <aws/io/logging.h>
2121
#include <aws/io/pki_utils.h>
2222

23+
#include <aws/common/string.h>
2324
#include <aws/common/task_scheduler.h>
2425
#include <aws/common/thread.h>
2526

source/tls_channel_handler.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
#include <aws/io/logging.h>
1919
#include <aws/io/tls_channel_handler.h>
2020

21+
#include <aws/common/string.h>
22+
2123
void aws_tls_ctx_options_init_default_client(struct aws_tls_ctx_options *options, struct aws_allocator *allocator) {
2224
AWS_ZERO_STRUCT(*options);
2325
options->allocator = allocator;

source/windows/secure_channel_tls_handler.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
#include <aws/io/tls_channel_handler.h>
1818

1919
#include <aws/common/math.h>
20+
#include <aws/common/string.h>
2021
#include <aws/common/task_scheduler.h>
2122

2223
#include <aws/io/channel.h>

0 commit comments

Comments
 (0)