remove hack breaking some cross compile builds. if you really need this, you should be using new enough glibc anyways

This commit is contained in:
Michael Jerris 2014-11-19 16:06:42 -05:00
parent df423b88d6
commit 62a2e10e41
5 changed files with 0 additions and 113 deletions

View File

@ -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
##

View File

@ -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=

View File

@ -1,93 +0,0 @@
/*
* FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
* Copyright (C) 2005-2014, Anthony Minessale II <anthm@freeswitch.org>
*
* 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 <anthm@freeswitch.org>
* Portions created by the Initial Developer are Copyright (C)
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
* Anthony Minessale II <anthm@freeswitch.org>
*
* 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 <sys/syscall.h>
#include <sys/types.h>
#include <sys/signal.h>
#include <sys/time.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <signal.h>
#include <poll.h>
#include <fcntl.h>
#include <time.h>
#include <errno.h>
#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

View File

@ -31,12 +31,7 @@
*/
#include <switch.h>
#ifdef TIMERFD_WRAP
#define TFD_CLOEXEC 0
#include <timerfd_wrap.h>
#else
#include <sys/timerfd.h>
#endif
#include <sys/epoll.h>
SWITCH_MODULE_LOAD_FUNCTION(mod_timerfd_load);

View File

@ -35,16 +35,9 @@
#include <stdio.h>
#include "private/switch_core_pvt.h"
#ifdef TIMERFD_WRAP
#include <timerfd_wrap.h>
#ifndef HAVE_TIMERFD_CREATE
#define HAVE_TIMERFD_CREATE
#endif
#else
#ifdef HAVE_TIMERFD_CREATE
#include <sys/timerfd.h>
#endif
#endif
//#if defined(DARWIN)
#define DISABLE_1MS_COND