Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion examples/chunkview.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@
#include <string.h>
#include <assert.h>
#include "libfreenect.h"

#ifdef _MSC_VER
#define HAVE_STRUCT_TIMESPEC
#endif
#include <pthread.h>

#if defined(__APPLE__)
Expand Down
3 changes: 3 additions & 0 deletions examples/glview.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@
#include <assert.h>
#include "libfreenect.h"

#ifdef _MSC_VER
#define HAVE_STRUCT_TIMESPEC
#endif
#include <pthread.h>

#if defined(__APPLE__)
Expand Down
3 changes: 3 additions & 0 deletions examples/hiview.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@
#include <assert.h>
#include "libfreenect.h"

#ifdef _MSC_VER
#define HAVE_STRUCT_TIMESPEC
#endif
#include <pthread.h>

#if defined(__APPLE__)
Expand Down
3 changes: 3 additions & 0 deletions examples/micview.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@
#include <stdio.h>
#include <string.h>
#include <signal.h>
#ifdef _MSC_VER
#define HAVE_STRUCT_TIMESPEC
#endif
#include <pthread.h>

#if defined(__APPLE__)
Expand Down
3 changes: 3 additions & 0 deletions examples/regview.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@
#include <assert.h>
#include "libfreenect.h"

#ifdef _MSC_VER
#define HAVE_STRUCT_TIMESPEC
#endif
#include <pthread.h>
#include <math.h>

Expand Down
3 changes: 2 additions & 1 deletion fakenect/fakenect.c
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,7 @@ int freenect_init(freenect_context **ctx, freenect_usb_context *usb_ctx)
char *var = getenv("FAKENECT_LOOP");
if (var) {
int len = strlen(var);
char tmp[len + 1];
char* tmp = malloc((len + 1) * sizeof(char));
int i;
for (i = 0; i < len; i++)
tmp[i] = tolower(var[i]);
Expand All @@ -551,6 +551,7 @@ int freenect_init(freenect_context **ctx, freenect_usb_context *usb_ctx)
strcmp(tmp, "off") == 0) {
loop_playback = false;
}
free (tmp);
}

*ctx = fake_ctx;
Expand Down
1 change: 0 additions & 1 deletion wrappers/cpp/cpp_pc_view.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
#include <cstdlib>
#include <iostream>
#include <vector>
#include <pthread.h>
#include <libfreenect.hpp>

#if defined(__APPLE__)
Expand Down
2 changes: 0 additions & 2 deletions wrappers/cpp/cppview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,7 @@
* either License.
*/


#include "libfreenect.hpp"
#include <pthread.h>
#include <stdio.h>
#include <iostream>
#include <string.h>
Expand Down
3 changes: 3 additions & 0 deletions wrappers/cpp/libfreenect.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@
#include <stdexcept>
#include <sstream>
#include <map>
#ifdef _MSC_VER
#define HAVE_STRUCT_TIMESPEC
#endif
#include <pthread.h>
#include <libusb.h>

Expand Down