Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Fixed compiling on older Linux systems without libudev
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Feb 24, 2013
1 parent 1eb18a5 commit 31e93c3
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 6 deletions.
13 changes: 12 additions & 1 deletion configure.in
Expand Up @@ -1767,9 +1767,20 @@ AC_HELP_STRING([--enable-pthread-sem], [use pthread semaphores [[default=yes]]])
pthread_cflags="-D_REENTRANT"
pthread_lib="-pthread"
;;
*-*-solaris2.9)
# From Solaris 9+, posix4's preferred name is rt.
pthread_cflags="-D_REENTRANT"
pthread_lib="-lpthread -lrt"
;;
*-*-solaris2.10)
# Solaris 10+ merged pthread into libc.
pthread_cflags="-D_REENTRANT"
pthread_lib="-lrt"
;;
*-*-solaris*)
# Solaris 11+ merged rt into libc.
pthread_cflags="-D_REENTRANT"
pthread_lib="-lpthread -lposix4"
pthread_lib=""
;;
*-*-sysv5*)
pthread_cflags="-D_REENTRANT -Kthread"
Expand Down
10 changes: 5 additions & 5 deletions src/joystick/linux/SDL_sysjoystick.c
Expand Up @@ -47,6 +47,11 @@
#include "../../events/SDL_events_c.h"
#endif

/* This isn't defined in older Linux kernel headers */
#ifndef SYN_DROPPED
#define SYN_DROPPED 3
#endif

/*
* !!! FIXME: move all the udev stuff to src/core/linux, so I can reuse it
* !!! FIXME: for audio hardware disconnects.
Expand All @@ -59,11 +64,6 @@
#include <sys/types.h>
#include <unistd.h>

/* This isn't defined in older Linux kernel headers */
#ifndef SYN_DROPPED
#define SYN_DROPPED 3
#endif

/* we never link directly to libudev. */
/* !!! FIXME: can we generalize this? ALSA, etc, do the same things. */
static const char *udev_library = "libudev.so.0";
Expand Down

0 comments on commit 31e93c3

Please sign in to comment.