Fixed compiling on older Linux systems without libudev

This commit is contained in:
Sam Lantinga 2013-02-24 12:55:51 -08:00
parent 3b188bfa98
commit 22f666c86c
2 changed files with 18 additions and 7 deletions

View file

@ -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.
@ -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";