alexlee188 / ghpsdr3-alex

Modifications of John Melton's ghpsdr3
GNU General Public License v3.0
63 stars 38 forks source link

DSP Server wont compile on OSX #34

Closed effeerre75 closed 7 years ago

effeerre75 commented 8 years ago

On OSX timer_t isn't defined in time.h Only reference if found about this was here: http://unix.stackexchange.com/questions/194480/why-is-timer-t-defined-in-time-h-on-linux-but-not-os-x

amontefusco commented 8 years ago

Please add to the source the following code (from the link above):

#if !defined __timer_t_defined && \
((defined _TIME_H && defined __USE_POSIX199309) || defined __need_timer_t)
# define __timer_t_defined      1

# include <bits/types.h>

/* Timer ID returned by `timer_create'.  */
typedef __timer_t timer_t;
#endif

if that cures the issue, please send me the patch and I will add to the sources in repo.

effeerre75 commented 8 years ago

Added this in client.c at line 82 seems to solve all, at least reach the end!

#ifdef __MACH__
#define _TIMER_T
typedef int timer_t;
#define CLOCK_REALTIME 0
struct itimerspec {
   struct timespec it_interval;  /* Timer interval */
   struct timespec it_value;     /* Initial expiration */
}; 
#endif  

Still not working: now the annoying part: "ld: symbol(s) not found for architecture x86_64" :(