mirror of
https://github.com/clearlinux/uwsgi.git
synced 2026-09-08 14:41:55 +00:00
old glibc fixes
This commit is contained in:
@@ -262,9 +262,31 @@ struct uwsgi_fmon *event_queue_ack_file_monitor(int id) {
|
||||
|
||||
#ifdef UWSGI_EVENT_TIMER_USE_TIMERFD
|
||||
|
||||
#ifndef UNBIT
|
||||
#ifndef UWSGI_EVENT_TIMER_USE_TIMERFD_NOINC
|
||||
#include <sys/timerfd.h>
|
||||
#else
|
||||
#endif
|
||||
|
||||
#ifndef timerfd_create
|
||||
|
||||
// timerfd support
|
||||
|
||||
enum
|
||||
{
|
||||
TFD_CLOEXEC = 02000000,
|
||||
#define TFD_CLOEXEC TFD_CLOEXEC
|
||||
TFD_NONBLOCK = 04000
|
||||
#define TFD_NONBLOCK TFD_NONBLOCK
|
||||
};
|
||||
|
||||
|
||||
/* Bits to be set in the FLAGS parameter of `timerfd_settime'. */
|
||||
enum
|
||||
{
|
||||
TFD_TIMER_ABSTIME = 1 << 0
|
||||
#define TFD_TIMER_ABSTIME TFD_TIMER_ABSTIME
|
||||
};
|
||||
|
||||
|
||||
static int timerfd_create (clockid_t __clock_id, int __flags) {
|
||||
return syscall(322, __clock_id, __flags);
|
||||
}
|
||||
|
||||
@@ -49,22 +49,3 @@ struct uidsec_struct {
|
||||
|
||||
};
|
||||
|
||||
|
||||
// timerfd support
|
||||
|
||||
enum
|
||||
{
|
||||
TFD_CLOEXEC = 02000000,
|
||||
#define TFD_CLOEXEC TFD_CLOEXEC
|
||||
TFD_NONBLOCK = 04000
|
||||
#define TFD_NONBLOCK TFD_NONBLOCK
|
||||
};
|
||||
|
||||
|
||||
/* Bits to be set in the FLAGS parameter of `timerfd_settime'. */
|
||||
enum
|
||||
{
|
||||
TFD_TIMER_ABSTIME = 1 << 0
|
||||
#define TFD_TIMER_ABSTIME TFD_TIMER_ABSTIME
|
||||
};
|
||||
|
||||
|
||||
@@ -651,6 +651,18 @@ options_parsed:
|
||||
}
|
||||
|
||||
#ifdef __linux__
|
||||
|
||||
#ifndef CLONE_NEWUTS
|
||||
#define CLONE_NEWUTS 0x04000000
|
||||
#endif
|
||||
|
||||
#ifndef CLONE_NEWPID
|
||||
#define CLONE_NEWPID 0x20000000
|
||||
#endif
|
||||
|
||||
#ifndef CLONE_NEWIPC
|
||||
#define CLONE_NEWIPC 0x08000000
|
||||
#endif
|
||||
uwsgi.ns = "/ns/001";
|
||||
if (uwsgi.ns) {
|
||||
void *linux_clone_stack = alloca(uwsgi.page_size);
|
||||
|
||||
@@ -260,6 +260,8 @@ class uConf(object):
|
||||
|
||||
if timer_mode == 'timerfd':
|
||||
self.cflags.append('-DUWSGI_EVENT_TIMER_USE_TIMERFD')
|
||||
if not os.path.exists('/usr/include/sys/timerfd.h') and not os.path.exists('/usr/local/include/sys/timerfd.h'):
|
||||
self.cflags.append('-DUWSGI_EVENT_TIMER_USE_TIMERFD_NOINC')
|
||||
elif timer_mode == 'kqueue':
|
||||
self.cflags.append('-DUWSGI_EVENT_TIMER_USE_KQUEUE')
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user