Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
P
paho.mqtt.c
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
eclipse
paho.mqtt.c
Commits
7a66543e
Commit
7a66543e
authored
Feb 03, 2017
by
Otavio Rodolfo Piske
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix compilation errors on test2 due to multiple symbol redefinitions
Signed-off-by:
Otavio Rodolfo Piske
<
opiske@redhat.com
>
parent
81357e97
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
2 deletions
+14
-2
CMakeLists.txt
test/CMakeLists.txt
+4
-0
test2.c
test/test2.c
+10
-2
No files found.
test/CMakeLists.txt
View file @
7a66543e
...
...
@@ -4,6 +4,10 @@ SET(MQTT_TEST_BROKER "tcp://localhost:1883" CACHE STRING "Hostname of a test MQT
SET
(
MQTT_SSL_HOSTNAME
"localhost"
CACHE STRING
"Hostname of a test SSL MQTT broker to use"
)
IF
(
WIN32
)
ADD_DEFINITIONS
(
/DCMAKE_BUILD
)
ENDIF
()
ADD_EXECUTABLE
(
test1
test1.c
...
...
test/test2.c
View file @
7a66543e
...
...
@@ -32,8 +32,15 @@
#include <errno.h>
#define WINAPI
#else
#include <winsock2.h>
#include <ws2tcpip.h>
#define WIN32_LEAN_AND_MEAN
#if !defined(CMAKE_BUILD)
/*
* These causes the cmake build to fail. In order to prevent affecting
* other builds, remove them only from CMAKE-related builds
*/
#include <winsock2.h>
#include <ws2tcpip.h>
#endif // CMAKE_BUILD
#define MAXHOSTNAMELEN 256
#define EAGAIN WSAEWOULDBLOCK
#define EINTR WSAEINTR
...
...
@@ -42,6 +49,7 @@
#define ENOTCONN WSAENOTCONN
#define ECONNRESET WSAECONNRESET
#define setenv(a, b, c) _putenv_s(a, b)
#endif
#define ARRAY_SIZE(a) (sizeof(a) / sizeof(a[0]))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment