* Use our own inotify headers if the system does not have them
* Don't rely on signal.h to include linux/types.h (for __u32 definition)
This commit is contained in:
parent
0d3505656d
commit
8de8a8dc50
@ -138,6 +138,14 @@ echo " * of BSD daemon() */" >> ${CONFIGFILE}
|
||||
echo "#define USE_DAEMON" >> ${CONFIGFILE}
|
||||
echo "" >> ${CONFIGFILE}
|
||||
|
||||
echo "/* Enable if the system inotify.h exists. Otherwise our own inotify.h will be used. */" >> ${CONFIGFILE}
|
||||
if [ -f /usr/include/sys/inotify.h ]; then
|
||||
echo "#define HAVE_INOTIFY_H" >> ${CONFIGFILE}
|
||||
else
|
||||
echo "/*#define HAVE_INOTIFY_H*/" >> ${CONFIGFILE}
|
||||
fi
|
||||
echo "" >> ${CONFIGFILE}
|
||||
|
||||
echo "/* Experimental UPnP Events support. */" >> ${CONFIGFILE}
|
||||
echo "#define ENABLE_EVENTS" >> ${CONFIGFILE}
|
||||
echo "" >> ${CONFIGFILE}
|
||||
|
@ -7,7 +7,12 @@
|
||||
#include <libgen.h>
|
||||
#include <errno.h>
|
||||
#include <sys/types.h>
|
||||
#ifdef HAVE_INOTIFY_H
|
||||
#include <sys/inotify.h>
|
||||
#else
|
||||
#include "inotify-includes/inotify.h"
|
||||
#include "inotify-includes/inotify-syscalls.h"
|
||||
#endif
|
||||
|
||||
#include "upnpglobalvars.h"
|
||||
#include "utils.h"
|
||||
|
@ -8,7 +8,7 @@
|
||||
#define __UPNPGLOBALVARS_H__
|
||||
|
||||
#include <time.h>
|
||||
#include <signal.h> // Defines __u32
|
||||
#include <linux/types.h> // Defines __u32
|
||||
|
||||
#include "minidlnatypes.h"
|
||||
#include "config.h"
|
||||
@ -54,7 +54,6 @@ extern struct runtime_vars_s runtime_vars;
|
||||
extern int runtime_flags;
|
||||
#define INOTIFYMASK 0x0001
|
||||
#define SYSUPTIMEMASK 0x0002
|
||||
#define CHECKCLIENTIPMASK 0x0008
|
||||
|
||||
#define SETFLAG(mask) runtime_flags |= mask
|
||||
#define GETFLAG(mask) runtime_flags & mask
|
||||
|
Loading…
x
Reference in New Issue
Block a user