mirror of
https://github.com/eclipse/paho.mqtt-sn.embedded-c.git
synced 2025-12-16 17:06:51 +01:00
Merge pull request #128 from eclipse/develop
You can select Aggregate or Transparent gateway in the config file setting.
This commit is contained in:
@@ -30,6 +30,20 @@
|
||||
using namespace std;
|
||||
using namespace MQTTSNGW;
|
||||
|
||||
#if defined(OSX)
|
||||
int sem_timedwait(sem_type sem, const struct timespec *timeout)
|
||||
{
|
||||
int rc = -1;
|
||||
int64_t tout = timeout->tv_sec * 1000L + tv_nsec * 1000000L
|
||||
rc = (int)dispatch_semaphore_wait(sem, dispatch_time(DISPATCH_TIME_NOW, tout));
|
||||
if (rc != 0)
|
||||
{
|
||||
rc = ETIMEDOUT;
|
||||
}
|
||||
return rc;
|
||||
}
|
||||
#endif
|
||||
|
||||
/*=====================================
|
||||
Class Mutex
|
||||
=====================================*/
|
||||
|
||||
Reference in New Issue
Block a user