Skip to content

Commit

Permalink
Build fixes for OpenBSD.
Browse files Browse the repository at this point in the history
  • Loading branch information
ralight committed May 21, 2015
1 parent 0733b3f commit 290ea87
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 2 deletions.
1 change: 1 addition & 0 deletions ChangeLog.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
- Fix incorrect bridge notification on initial connection. Closes #467096.
- Build fixes for OpenBSD.

1.4.2 - 20150507
================
Expand Down
3 changes: 3 additions & 0 deletions config.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,6 @@
#define uthash_malloc(sz) _mosquitto_malloc(sz)
#define uthash_free(ptr,sz) _mosquitto_free(ptr)

#ifndef EPROTO
# define EPROTO ECONNABORTED
#endif
2 changes: 1 addition & 1 deletion config.mk
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ LIB_LDFLAGS:=${LDFLAGS}
BROKER_CFLAGS:=${LIB_CFLAGS} ${CPPFLAGS} -DVERSION="\"${VERSION}\"" -DTIMESTAMP="\"${TIMESTAMP}\"" -DWITH_BROKER
CLIENT_CFLAGS:=${CFLAGS} ${CPPFLAGS} -I../lib -DVERSION="\"${VERSION}\""

ifeq ($(UNAME),FreeBSD)
ifneq ($(or $(find $(UNAME),FreeBSD), $(find $(UNAME),OpenBSD)),)
BROKER_LIBS:=-lm
else
BROKER_LIBS:=-ldl -lm
Expand Down
2 changes: 1 addition & 1 deletion lib/memory_mosq.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ and the Eclipse Distribution License is available at
#include <stdio.h>
#include <sys/types.h>

#if defined(WITH_MEMORY_TRACKING) && defined(WITH_BROKER) && !defined(WIN32) && !defined(__SYMBIAN32__) && !defined(__ANDROID__) && !defined(__UCLIBC__)
#if defined(WITH_MEMORY_TRACKING) && defined(WITH_BROKER) && !defined(WIN32) && !defined(__SYMBIAN32__) && !defined(__ANDROID__) && !defined(__UCLIBC__) && !defined(__OpenBSD__)
#define REAL_WITH_MEMORY_TRACKING
#endif

Expand Down
2 changes: 2 additions & 0 deletions lib/mosquitto.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ typedef int ssize_t;
#include <util_mosq.h>
#include <will_mosq.h>

#include "config.h"

#if !defined(WIN32) && !defined(__SYMBIAN32__)
#define HAVE_PSELECT
#endif
Expand Down
2 changes: 2 additions & 0 deletions lib/net_mosq.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ and the Eclipse Distribution License is available at
#include <time_mosq.h>
#include <util_mosq.h>

#include "config.h"

#ifdef WITH_TLS
int tls_ex_index_mosq = -1;
#endif
Expand Down
1 change: 1 addition & 0 deletions lib/tls_mosq.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ and the Eclipse Distribution License is available at
# include <ws2tcpip.h>
#else
# include <arpa/inet.h>
# include <sys/socket.h>
#endif

#include <string.h>
Expand Down

0 comments on commit 290ea87

Please sign in to comment.