diff options
author | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2004-06-28 20:10:28 +0000 |
---|---|---|
committer | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2004-06-28 20:10:28 +0000 |
commit | 62414649cb95489a7d4a1aa7ddb80f839d216dab (patch) | |
tree | 68e35e870e04a117796cc68b7aa3987cb2c0341c /utils.c | |
parent | 42b9d7dc97283f01960ec8411120db90513b0010 (diff) |
Merge OSX compatibility patch (bug #1940)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@3331 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'utils.c')
-rwxr-xr-x | utils.c | 5 |
1 files changed, 1 insertions, 4 deletions
@@ -18,7 +18,7 @@ static char base64[64]; static char b2a[256]; -#if defined(__FreeBSD__) || defined(__OpenBSD__) +#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__APPLE__) /* duh? ERANGE value copied from web... */ #define ERANGE 34 @@ -190,13 +190,11 @@ int test_for_thread_safety(void) ast_mutex_lock(&test_lock); lock_count += 1; pthread_create(&test_thread, NULL, test_thread_body, NULL); - pthread_yield(); usleep(100); if (lock_count != 2) test_errors++; ast_mutex_unlock(&test_lock); lock_count -= 1; - pthread_yield(); usleep(100); if (lock_count != 1) test_errors++; @@ -205,7 +203,6 @@ int test_for_thread_safety(void) if (lock_count != 0) test_errors++; ast_mutex_unlock(&test_lock2); - pthread_yield(); usleep(100); if (lock_count != 0) test_errors++; |