You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Filipe Santos (JIRA)" <ji...@apache.org> on 2015/04/29 19:05:07 UTC

[jira] [Created] (QPID-6519) Compilation for Mac Os

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: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org