Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ elseif(UNIX)
set(LIBS_SYSTEM compat pthread)
elseif(CMAKE_SYSTEM_NAME MATCHES "QNX")
set(LIBS_SYSTEM c)
add_definitions(-D_QNX_SOURCE -DGULLIVER)
else()
set(LIBS_SYSTEM c pthread)
endif()
Expand Down
20 changes: 19 additions & 1 deletion src/MQTTPacket.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,19 @@
#include "LinkedList.h"
#include "Clients.h"


#ifdef __cplusplus
#include <stdbool.h>
#else
#ifndef __bool_true_false_are_defined
#ifndef bool
typedef unsigned int bool;
#endif
#endif
#endif

typedef unsigned int bit;

typedef void* (*pf)(int, unsigned char, char*, size_t);

#include "MQTTProperties.h"
Expand Down Expand Up @@ -58,7 +70,13 @@ enum msgTypes
#endif

/**
* Bitfields for the MQTT header byte.
*





fields for the MQTT header byte.
*/
typedef union
{
Expand Down
7 changes: 7 additions & 0 deletions src/SHA1.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,13 @@

#include "SHA1.h"

// In the source files using endian functions (like SHA1.c):
#ifdef QNX_OS
#include <gulliver.h>
#define be32toh(x) ENDIAN_BE32(x)
#define htobe32(x) ENDIAN_BE32(x)
#endif

#if !defined(OPENSSL)
#if defined(_WIN32)
#pragma comment(lib, "crypt32.lib")
Expand Down
4 changes: 4 additions & 0 deletions src/Thread.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@
#undef ETIMEDOUT
#define ETIMEDOUT WSAETIMEDOUT
#else
#if defined(QNX_OS)
#include <sys/neutrino.h>
#include <process.h>
#endif
#include <pthread.h>

#define thread_type pthread_t
Expand Down