Commit c6b3de5e authored by Sven Gestegård Robertz's avatar Sven Gestegård Robertz
Browse files

hack for fake_server on MacOS X, tidy Makefile.fake

parent 251d7d33
......@@ -3,8 +3,16 @@
# For compiling on PC
.PHONY: all
.PHONY: all clean
all: fake_server
CPPFLAGS+=-DFAKE -DDISABLE_SANITY_CHECKS
CFLAGS+=-DFAKE -DDISABLE_SANITY_CHECKS
CFLAGS+=-Wall
LDLIBS=-lpthread
fake_server: http_server.c fakecapture.h fakecapture.c camera.h camera.c
$(CC) -o $@ -DFAKE -DDISABLE_SANITY_CHECKS $^ -lpthread
$(CC) -o $@ $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) http_server.c fakecapture.c camera.c $(LDLIBS)
clean:
-rm fake_server
......@@ -9,10 +9,14 @@
static int frame_nr = START_FRAME;
#ifdef __MACH__
#define UNUSED_VALUE 1
#define CLOCK_MONOTONIC UNUSED_VALUE
int clock_gettime(int clk_id, struct timespec* t) {
struct timeval now;
if(gettimeofday(&now, NULL));
return rv;
int res;
if((res=gettimeofday(&now, NULL))){
return res;
}
t->tv_sec = now.tv_sec;
t->tv_nsec = now.tv_usec * 1000;
return 0;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment