Filipe Santos created QPID-6519:
-----------------------------------

             Summary: Compilation for Mac Os
                 Key: QPID-6519
                 URL: https://issues.apache.org/jira/browse/QPID-6519
             Project: Qpid
          Issue Type: New Feature
          Components: C++ Client
         Environment: Mac Os X
            Reporter: Filipe Santos
            Priority: Trivial


Hi everyone

In order to compile the Qpid C++ client for Mac Os I had to add this small 
definition to sys/posix/time.h

------------------------
#ifndef CLOCK_MONOTONIC 
#define CLOCK_MONOTONIC 0 
#define CLOCK_REALTIME 0 

static int 
clock_gettime(int foo, struct timespec *ts) 
{ 
        struct timeval tv; 
         
        gettimeofday(&tv, NULL); 
        ts->tv_sec = tv.tv_sec; 
        ts->tv_nsec = tv.tv_usec * 1000; 
        return (0); 
} 
         
static int pthread_condattr_setclock(pthread_condattr_t *attr, int foo) 
{ 
        (void)attr; 
        (void)foo; 
        return (0); 
} 
#endif /* !CLOCK_MONOTONIC */ 
-------------------------------------

The main problem is that Mac does not have the MONOTONIC definition in it but I 
saw this solution in other project (Varnish Project). Don't know how much 
influence this can cause in qpid client but it is working.

As reported in the mailling list, I could only compile the libqmf2, 
libqpidclient, libqpidcommon, libqpidmessaging and libqpidtypes so if there is 
any way the Makefile automatically choose only those projects for that SO it 
would be good.

Best 

Filipe Santos



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to