Fixed building on FreeBSD

Alex S

Looks like we have a collision with https://hg.libsdl.org/SDL/rev/cd774daff9f6. (Again, the headers in the base system are intended for drivers and should not be used for compiling non-base applications. At least that's the policy for now: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=240964#c19.)
This commit is contained in:
Sam Lantinga 2020-11-24 06:42:53 -08:00
parent feab9d42c1
commit 7a05dbf4b9
3 changed files with 13 additions and 61 deletions

28
configure vendored
View File

@ -22715,32 +22715,6 @@ CheckInputEvents()
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Linux 2.4 unified input interface" >&5
$as_echo_n "checking for Linux 2.4 unified input interface... " >&6; }
use_input_events=no
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <dev/evdev/input.h>
int
main ()
{
#ifndef EVIOCGNAME
#error EVIOCGNAME() ioctl not available
#endif
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
use_input_events=yes
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
if test x$use_input_events = xno; then
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@ -22764,8 +22738,6 @@ if ac_fn_c_try_compile "$LINENO"; then :
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $use_input_events" >&5
$as_echo "$use_input_events" >&6; }
if test x$use_input_events = xyes; then

View File

@ -2605,20 +2605,6 @@ CheckInputEvents()
dnl Check for Linux 2.4 unified input event interface support
AC_MSG_CHECKING(for Linux 2.4 unified input interface)
use_input_events=no
dnl FreeBSD puts this in /usr/include/dev/evdev/input.h ...
AC_TRY_COMPILE([
#include <dev/evdev/input.h>
],[
#ifndef EVIOCGNAME
#error EVIOCGNAME() ioctl not available
#endif
],[
use_input_events=yes
])
dnl And Linux of course puts it in linux/input.h ...
if test x$use_input_events = xno; then
AC_TRY_COMPILE([
#include <linux/input.h>
],[
@ -2628,8 +2614,6 @@ CheckInputEvents()
],[
use_input_events=yes
])
fi
AC_MSG_RESULT($use_input_events)
if test x$use_input_events = xyes; then
AC_DEFINE(SDL_INPUT_LINUXEV, 1, [ ])

View File

@ -22,11 +22,7 @@
#ifndef SDL_sysjoystick_c_h_
#define SDL_sysjoystick_c_h_
#ifdef __linux__
#include <linux/input.h>
#else /* FreeBSD (and maybe others) */
#include <dev/evdev/input.h>
#endif
struct SDL_joylist_item;