Skip to content

Commit

Permalink
Guard ssize_t definition on Windows.
Browse files Browse the repository at this point in the history
Closes #522. Thanks to trinytron.
  • Loading branch information
ralight committed Sep 4, 2019
1 parent 01530a3 commit 7686570
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions ChangeLog.txt
Expand Up @@ -14,6 +14,7 @@ Documentation:
Build:
- Fix missing function warnings on NetBSD.
- Fix WITH_STATIC_LIBRARIES using CMake on Windows. Closes #1369.
- Guard ssize_t definition on Windows. Closes #522.


1.6.4 - 20190801
Expand Down
7 changes: 5 additions & 2 deletions lib/net_mosq.h
Expand Up @@ -17,10 +17,13 @@ and the Eclipse Distribution License is available at
#define NET_MOSQ_H

#ifndef WIN32
#include <unistd.h>
# include <unistd.h>
#else
#include <winsock2.h>
# include <winsock2.h>
# ifndef _SSIZE_T_DEFINED
typedef SSIZE_T ssize_t;
# define _SSIZE_T_DEFINED
# endif
#endif

#include "mosquitto_internal.h"
Expand Down

0 comments on commit 7686570

Please sign in to comment.