old glibc fixes

This commit is contained in:
roberto@fedora64
2011-01-02 18:19:11 +01:00
parent 9ef571b4fa
commit a64cbea6e8
4 changed files with 38 additions and 21 deletions
+24 -2
View File
@@ -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);
}
-19
View File
@@ -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
};
+12
View File
@@ -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);
+2
View File
@@ -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: