From 62a2e10e4137c443cf7d199f98443b50f6351ef9 Mon Sep 17 00:00:00 2001 From: Michael Jerris Date: Wed, 19 Nov 2014 16:06:42 -0500 Subject: [PATCH] remove hack breaking some cross compile builds. if you really need this, you should be using new enough glibc anyways --- Makefile.am | 4 - configure.ac | 4 - src/include/timerfd_wrap.h | 93 ------------------------ src/mod/timers/mod_timerfd/mod_timerfd.c | 5 -- src/switch_time.c | 7 -- 5 files changed, 113 deletions(-) delete mode 100644 src/include/timerfd_wrap.h diff --git a/Makefile.am b/Makefile.am index 886c5edf63..96e9181646 100644 --- a/Makefile.am +++ b/Makefile.am @@ -141,10 +141,6 @@ if HAVE_ODBC CORE_CFLAGS += -DSWITCH_HAVE_ODBC $(ODBC_INC_FLAGS) endif -if ENABLE_TIMERFD_WRAPPER -CORE_CFLAGS += -DTIMERFD_WRAP -endif - ## ## libfreeswitch ## diff --git a/configure.ac b/configure.ac index a11de35c84..a91690aeca 100644 --- a/configure.ac +++ b/configure.ac @@ -630,10 +630,6 @@ if test x"$enable_deprecated_core_db_events" = x"yes" ; then AC_DEFINE([SWITCH_DEPRECATED_CORE_DB], [1], [Define to 1 to enable deprecated core db events]) fi -AC_ARG_ENABLE(timerfd-wrapper, -[AC_HELP_STRING([--enable-timerfd-wrapper],[timerfd is in the kernel but not in your libc])],[enable_timer_fd_wrapper="$enableval"],[enable_timer_fd_wrapper="no"]) -AM_CONDITIONAL([ENABLE_TIMERFD_WRAPPER],[test "x$enable_timer_fd_wrapper" != "xno"]) - ESL_LDFLAGS= PLATFORM_CORE_LDFLAGS= PLATFORM_CORE_LIBS= diff --git a/src/include/timerfd_wrap.h b/src/include/timerfd_wrap.h deleted file mode 100644 index bdcd11b4f1..0000000000 --- a/src/include/timerfd_wrap.h +++ /dev/null @@ -1,93 +0,0 @@ -/* - * FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application - * Copyright (C) 2005-2014, Anthony Minessale II - * - * Version: MPL 1.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application - * - * The Initial Developer of the Original Code is - * Anthony Minessale II - * Portions created by the Initial Developer are Copyright (C) - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Anthony Minessale II - * - * timerfd_wrap.h -- timerfd syscall wrapper - * - */ -/*! \file timerfd_wrap.h - \brief timerfd syscall wrapper -*/ - -#ifndef TIMERFD_WRAP_H -#define TIMERFD_WRAP_H -SWITCH_BEGIN_EXTERN_C - -#ifndef _GNU_SOURCE -#define _GNU_SOURCE -#endif -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - - -#ifndef __NR_timerfd -#if defined(__x86_64__) -#define __NR_timerfd_create 283 -#define __NR_timerfd_settime 286 -#define __NR_timerfd_gettime 287 -#elif defined(__i386__) -#define __NR_timerfd_create 322 -#define __NR_timerfd_settime 325 -#define __NR_timerfd_gettime 326 -#else -#error invalid system -#endif -#endif - -#define TFD_TIMER_ABSTIME (1 << 0) - -int timerfd_create(int clockid, int flags) -{ - - return syscall(__NR_timerfd_create, clockid, flags); -} - -int timerfd_settime(int ufc, int flags, const struct itimerspec *utmr, struct itimerspec *otmr) -{ - - return syscall(__NR_timerfd_settime, ufc, flags, utmr, otmr); -} - -int timerfd_gettime(int ufc, struct itimerspec *otmr) -{ - - return syscall(__NR_timerfd_gettime, ufc, otmr); -} - -SWITCH_END_EXTERN_C - -#endif diff --git a/src/mod/timers/mod_timerfd/mod_timerfd.c b/src/mod/timers/mod_timerfd/mod_timerfd.c index 0eafab5e48..bd07be8cdd 100644 --- a/src/mod/timers/mod_timerfd/mod_timerfd.c +++ b/src/mod/timers/mod_timerfd/mod_timerfd.c @@ -31,12 +31,7 @@ */ #include -#ifdef TIMERFD_WRAP -#define TFD_CLOEXEC 0 -#include -#else #include -#endif #include SWITCH_MODULE_LOAD_FUNCTION(mod_timerfd_load); diff --git a/src/switch_time.c b/src/switch_time.c index dc3fe50303..cc5fbe8dbe 100644 --- a/src/switch_time.c +++ b/src/switch_time.c @@ -35,16 +35,9 @@ #include #include "private/switch_core_pvt.h" -#ifdef TIMERFD_WRAP -#include -#ifndef HAVE_TIMERFD_CREATE -#define HAVE_TIMERFD_CREATE -#endif -#else #ifdef HAVE_TIMERFD_CREATE #include #endif -#endif //#if defined(DARWIN) #define DISABLE_1MS_COND