Skip to content

Commit

Permalink
Compile fixes for MinGW.
Browse files Browse the repository at this point in the history
Signed-off-by: Drew Fisher <[email protected]>
  • Loading branch information
zarvox committed Jul 22, 2011
1 parent 7eee3d5 commit 0454844
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
9 changes: 8 additions & 1 deletion platform/windows/unistd.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,13 @@
#define _WINDOWS_UNISTD_EMULATED_H_

#include <stdint.h>
typedef int ssize_t;

// MinGW defines _SSIZE_T_ in sys/types.h when it defines ssize_t to be a long.
// Redefining it causes an error.
// MSVC does not define this.
#ifndef _SSIZE_T_
#define _SSIZE_T_
typedef long ssize_t;
#endif // _SSIZE_T_

#endif//_WINDOWS_UNISTD_EMULATED_H_
4 changes: 2 additions & 2 deletions src/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,11 @@ FREENECTAPI int freenect_num_devices(freenect_context *ctx)
}

FREENECTAPI void freenect_select_subdevices(freenect_context *ctx, freenect_device_flags subdevs) {
ctx->enabled_subdevices = subdevs & (freenect_device_flags)(FREENECT_DEVICE_MOTOR | FREENECT_DEVICE_CAMERA
ctx->enabled_subdevices = (freenect_device_flags)(subdevs & (FREENECT_DEVICE_MOTOR | FREENECT_DEVICE_CAMERA
#ifdef BUILD_AUDIO
| FREENECT_DEVICE_AUDIO
#endif
);
));
}

FREENECTAPI int freenect_open_device(freenect_context *ctx, freenect_device **dev, int index)
Expand Down

0 comments on commit 0454844

Please sign in to comment.