Merge pull request #428 from micmac1/fs-186
[feed/telephony.git] / net / freeswitch / patches / musl / libs-apr-configure_ac.patch
1 --- a/libs/apr/configure.ac
2 +++ b/libs/apr/configure.ac
3 @@ -1624,38 +1624,7 @@ if test "$threads" = "1"; then
4 APR_CHECK_DEFINE(PTHREAD_PROCESS_SHARED, pthread.h)
5 AC_CHECK_FUNCS(pthread_mutexattr_setpshared)
6 AC_CHECK_LIB(pthread, pthread_setschedparam, [AC_DEFINE(HAVE_PTHREAD_SETSCHEDPARAM, 1, [Define if you have pthread_setschedparam()])])
7 -
8 - # Some systems have setpshared and define PROCESS_SHARED, but don't
9 - # really support PROCESS_SHARED locks. So, we must validate that we
10 - # can go through the steps without receiving some sort of system error.
11 - # Linux and older versions of AIX have this problem.
12 - APR_IFALLYES(header:pthread.h define:PTHREAD_PROCESS_SHARED func:pthread_mutexattr_setpshared, [
13 - AC_CACHE_CHECK([for working PROCESS_SHARED locks], apr_cv_process_shared_works, [
14 - AC_TRY_RUN([
15 -#include <sys/types.h>
16 -#include <pthread.h>
17 - int main()
18 - {
19 - pthread_mutex_t mutex;
20 - pthread_mutexattr_t attr;
21 - if (pthread_mutexattr_init(&attr))
22 - exit(1);
23 - if (pthread_mutexattr_setpshared(&attr, PTHREAD_PROCESS_SHARED))
24 - exit(2);
25 - if (pthread_mutex_init(&mutex, &attr))
26 - exit(3);
27 - if (pthread_mutexattr_destroy(&attr))
28 - exit(4);
29 - if (pthread_mutex_destroy(&mutex))
30 - exit(5);
31 - exit(0);
32 - }], [apr_cv_process_shared_works=yes], [apr_cv_process_shared_works=no])])
33 - # Override detection of pthread_mutexattr_setpshared
34 - ac_cv_func_pthread_mutexattr_setpshared=$apr_cv_process_shared_works])
35 -
36 - if test "$ac_cv_func_pthread_mutexattr_setpshared" = "yes"; then
37 - APR_CHECK_PTHREAD_ROBUST_SHARED_MUTEX
38 - fi
39 + APR_CHECK_PTHREAD_ROBUST_SHARED_MUTEX
40 fi
41
42 # See which lock mechanisms we can support on this system.
43 @@ -1956,7 +1925,11 @@ fi
44
45 APR_CHECK_TCP_NODELAY_INHERITED
46 APR_CHECK_O_NONBLOCK_INHERITED
47 -APR_CHECK_TCP_NODELAY_WITH_CORK
48 +
49 +dnl Check TCP_NODELAY_WITH_CORK ONLY when NOT cross compiling
50 +if test "$cross_compiling" != yes; then
51 + APR_CHECK_TCP_NODELAY_WITH_CORK
52 +fi
53
54 # Look for a way of corking TCP...
55 APR_CHECK_DEFINE(TCP_CORK, netinet/tcp.h)