Fix issue with cross-compiling failing
(closes issue #18301) Reported by: abelbeck Patches: asterisk-1.4-bugid18301.patch.txt uploaded by abelbeck (license 946) Tested by: abelbeck, russellb git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@301869 f38db490-d61c-443f-a65b-d21fe96a405b
This commit is contained in:
parent
d0220b8f78
commit
a744dc6e90
34
configure.ac
34
configure.ac
|
@ -480,40 +480,6 @@ AC_LANG_PROGRAM([
|
|||
AC_MSG_RESULT(cross-compile)
|
||||
)
|
||||
|
||||
ac_cv_have_variable_fdset=0
|
||||
AC_MSG_CHECKING(if we can increase the maximum select-able file descriptor)
|
||||
AC_RUN_IFELSE(
|
||||
AC_LANG_PROGRAM([
|
||||
#include <stdio.h>
|
||||
#include <sys/select.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/resource.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#include <stdlib.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
], [[
|
||||
struct rlimit rlim = { FD_SETSIZE + 2, FD_SETSIZE + 2 };
|
||||
int fd[[2]];
|
||||
struct timeval tv = { 0, };
|
||||
struct ast_fdset { long fds_bits[[1024]]; } fds = { { 0, } };
|
||||
if (setrlimit(RLIMIT_NOFILE, &rlim)) { exit(1); }
|
||||
if ((fd0 = open("/dev/null", O_RDONLY)) < 0) { exit(1); }
|
||||
if (dup2(fd0, (fd1 = FD_SETSIZE + 1)) < 0) { exit(1); }
|
||||
FD_SET(fd[[0]], (fd_set *) &fds);
|
||||
FD_SET(fd[[1]], (fd_set *) &fds);
|
||||
if (select(FD_SETSIZE + 2, (fd_set *) &fds, NULL, NULL, &tv) < 0) { exit(1); }
|
||||
exit(0)]]),
|
||||
AC_MSG_RESULT(yes)
|
||||
ac_cv_have_variable_fdset=1
|
||||
AC_DEFINE([HAVE_VARIABLE_FDSET], 1, [Define to 1 if your system can support larger than default select bitmasks.]),
|
||||
AC_MSG_RESULT(no),
|
||||
AC_MSG_RESULT(cross-compile)
|
||||
)
|
||||
|
||||
if test "${ac_cv_have_variable_fdset}x" = "0x"; then
|
||||
AC_RUN_IFELSE(
|
||||
AC_LANG_PROGRAM([
|
||||
|
|
|
@ -484,7 +484,7 @@
|
|||
/* Define to 1 if you have the `strtoq' function. */
|
||||
#undef HAVE_STRTOQ
|
||||
|
||||
/* Define to 1 if `st_blksize' is a member of `struct stat'. */
|
||||
/* Define to 1 if `st_blksize' is member of `struct stat'. */
|
||||
#undef HAVE_STRUCT_STAT_ST_BLKSIZE
|
||||
|
||||
/* Define to 1 if you have the mISDN Supplemental Services library. */
|
||||
|
@ -677,12 +677,12 @@
|
|||
/* Define to the one symbol short name of this package. */
|
||||
#undef PACKAGE_TARNAME
|
||||
|
||||
/* Define to the home page for this package. */
|
||||
#undef PACKAGE_URL
|
||||
|
||||
/* Define to the version of this package. */
|
||||
#undef PACKAGE_VERSION
|
||||
|
||||
/* Define to 1 if the C compiler supports function prototypes. */
|
||||
#undef PROTOTYPES
|
||||
|
||||
/* Define to necessary symbol if this constant uses a non-standard name on
|
||||
your system. */
|
||||
#undef PTHREAD_CREATE_JOINABLE
|
||||
|
@ -702,6 +702,11 @@
|
|||
/* Define to the type of arg 5 for `select'. */
|
||||
#undef SELECT_TYPE_ARG5
|
||||
|
||||
/* Define to 1 if the `setvbuf' function takes the buffering type as its
|
||||
second argument and the buffer pointer as the third, as on System V before
|
||||
release 3. */
|
||||
#undef SETVBUF_REVERSED
|
||||
|
||||
/* The size of `fd_set.fds_bits', as computed by sizeof. */
|
||||
#undef SIZEOF_FD_SET_FDS_BITS
|
||||
|
||||
|
@ -734,27 +739,12 @@
|
|||
/* Define to a type of the same size as fd_set.fds_bits[[0]] */
|
||||
#undef TYPEOF_FD_SET_FDS_BITS
|
||||
|
||||
/* Enable extensions on AIX 3, Interix. */
|
||||
/* Define to 1 if on AIX 3.
|
||||
System headers sometimes define this.
|
||||
We just want to avoid a redefinition error message. */
|
||||
#ifndef _ALL_SOURCE
|
||||
# undef _ALL_SOURCE
|
||||
#endif
|
||||
/* Enable GNU extensions on systems that have them. */
|
||||
#ifndef _GNU_SOURCE
|
||||
# undef _GNU_SOURCE
|
||||
#endif
|
||||
/* Enable threading extensions on Solaris. */
|
||||
#ifndef _POSIX_PTHREAD_SEMANTICS
|
||||
# undef _POSIX_PTHREAD_SEMANTICS
|
||||
#endif
|
||||
/* Enable extensions on HP NonStop. */
|
||||
#ifndef _TANDEM_SOURCE
|
||||
# undef _TANDEM_SOURCE
|
||||
#endif
|
||||
/* Enable general extensions on Solaris. */
|
||||
#ifndef __EXTENSIONS__
|
||||
# undef __EXTENSIONS__
|
||||
#endif
|
||||
|
||||
|
||||
/* Define to 1 if running on Darwin. */
|
||||
#undef _DARWIN_UNLIMITED_SELECT
|
||||
|
@ -762,6 +752,11 @@
|
|||
/* Number of bits in a file offset, on hosts where this is settable. */
|
||||
#undef _FILE_OFFSET_BITS
|
||||
|
||||
/* Enable GNU extensions on systems that have them. */
|
||||
#ifndef _GNU_SOURCE
|
||||
# undef _GNU_SOURCE
|
||||
#endif
|
||||
|
||||
/* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */
|
||||
#undef _LARGEFILE_SOURCE
|
||||
|
||||
|
@ -778,6 +773,20 @@
|
|||
/* Define to 1 if you need to in order for `stat' and other things to work. */
|
||||
#undef _POSIX_SOURCE
|
||||
|
||||
/* Enable extensions on Solaris. */
|
||||
#ifndef __EXTENSIONS__
|
||||
# undef __EXTENSIONS__
|
||||
#endif
|
||||
#ifndef _POSIX_PTHREAD_SEMANTICS
|
||||
# undef _POSIX_PTHREAD_SEMANTICS
|
||||
#endif
|
||||
#ifndef _TANDEM_SOURCE
|
||||
# undef _TANDEM_SOURCE
|
||||
#endif
|
||||
|
||||
/* Define like PROTOTYPES; this can be used by system headers. */
|
||||
#undef __PROTOTYPES
|
||||
|
||||
/* Define to empty if `const' does not conform to ANSI C. */
|
||||
#undef const
|
||||
|
||||
|
|
Reference in New Issue