From 0109fb42955d4250870d93c2b35e8a1db9aed934 Mon Sep 17 00:00:00 2001 From: Rob Messick Date: Sun, 23 Feb 2014 12:15:14 -0800 Subject: alloca() lives in stdlib.h on FreeBSD --- platform/x11/platform_config.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'platform') diff --git a/platform/x11/platform_config.h b/platform/x11/platform_config.h index d14f3e3f9..21703969c 100644 --- a/platform/x11/platform_config.h +++ b/platform/x11/platform_config.h @@ -26,7 +26,13 @@ /* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ +#ifdef __linux__ #include +#endif +#ifdef __FreeBSD__ +#include +#endif + #define GLES2_INCLUDE_H "gl_context/glew.h" #define GLES1_INCLUDE_H "gl_context/glew.h" -- cgit v1.2.3-70-g09d2 From fd03693df1a7e86ce6fef7f077398deb91e81e95 Mon Sep 17 00:00:00 2001 From: Rob Messick Date: Sun, 23 Feb 2014 12:20:27 -0800 Subject: Only include linux/joystick.h on linux --- platform/x11/os_x11.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'platform') diff --git a/platform/x11/os_x11.cpp b/platform/x11/os_x11.cpp index d95818b4a..2d536f231 100644 --- a/platform/x11/os_x11.cpp +++ b/platform/x11/os_x11.cpp @@ -45,7 +45,10 @@ #include #include #include + +#ifdef __linux__ #include +#endif //stupid linux.h #ifdef KEY_TAB @@ -1031,7 +1034,6 @@ void OS_X11::close_joystick(int p_id) { }; void OS_X11::probe_joystick(int p_id) { - if (p_id == -1) { for (int i=0; i