Because I have random sementation faults with the 2.8 version, I wanted to
try the latest dev version.
What steps will reproduce the problem?
1. Get today's hg repo
2. Try to compile with gcc-4.0.1-glibc-2.3.5/arm-unknown-linux-gnu from
ftp://ftp.embeddedarm.com/ts-arm-sbc/ts-7200-linux/cross-toolchains/
Following error occured:
make linux
arm-unknown-linux-gnu-gcc -D_POSIX_SOURCE -D_BSD_SOURCE
-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -ldl -lpthread -W -Wall -std=c99
-pedantic -Os -fomit-frame-pointer mongoose.c -shared -fPIC -fpic -s -o
_mongoose.so
mongoose.c:399: error: syntax error before 'pthread_rwlock_t'
mongoose.c:399: warning: no semicolon at end of struct or union
mongoose.c:407: error: syntax error before '}' token
mongoose.c:407: warning: ISO C does not allow extra ';' outside of a function
mongoose.c: In function 'cry':
mongoose.c:444: error: dereferencing pointer to incomplete type
mongoose.c:449: warning: implicit declaration of function
'pthread_rwlock_rdlock'
mongoose.c:449: error: dereferencing pointer to incomplete type
mongoose.c:450: error: dereferencing pointer to incomplete type
mongoose.c:451: error: dereferencing pointer to incomplete type
mongoose.c:452: warning: implicit declaration of function
'pthread_rwlock_unlock'
mongoose.c:452: error: dereferencing pointer to incomplete type
mongoose.c: In function 'send_error':
mongoose.c:737: error: dereferencing pointer to incomplete type
mongoose.c: In function 'spawn_process':
mongoose.c:1326: error: dereferencing pointer to incomplete type
mongoose.c: In function 'convert_uri_to_file_name':
mongoose.c:1591: error: dereferencing pointer to incomplete type
mongoose.c:1592: error: dereferencing pointer to incomplete type
mongoose.c:1595: error: dereferencing pointer to incomplete type
mongoose.c:1604: error: dereferencing pointer to incomplete type
mongoose.c: In function 'get_mime_type':
mongoose.c:1835: error: dereferencing pointer to incomplete type
mongoose.c:1836: error: dereferencing pointer to incomplete type
mongoose.c:1842: error: dereferencing pointer to incomplete type
mongoose.c:1846: error: dereferencing pointer to incomplete type
mongoose.c: In function 'open_auth_file':
mongoose.c:2179: error: dereferencing pointer to incomplete type
mongoose.c:2180: error: dereferencing pointer to incomplete type
mongoose.c:2182: error: dereferencing pointer to incomplete type
mongoose.c:2185: error: dereferencing pointer to incomplete type
mongoose.c:2211: error: dereferencing pointer to incomplete type
mongoose.c: In function 'authorize':
mongoose.c:2298: error: dereferencing pointer to incomplete type
mongoose.c:2299: error: dereferencing pointer to incomplete type
mongoose.c:2300: error: dereferencing pointer to incomplete type
mongoose.c: In function 'check_authorization':
mongoose.c:2334: error: dereferencing pointer to incomplete type
mongoose.c:2335: error: dereferencing pointer to incomplete type
mongoose.c:2346: error: dereferencing pointer to incomplete type
mongoose.c: In function 'send_authorization_request':
mongoose.c:2364: error: dereferencing pointer to incomplete type
mongoose.c:2365: error: dereferencing pointer to incomplete type
mongoose.c:2366: error: dereferencing pointer to incomplete type
mongoose.c: In function 'is_authorized_for_put':
mongoose.c:2382: error: dereferencing pointer to incomplete type
mongoose.c:2383: error: dereferencing pointer to incomplete type
mongoose.c:2384: error: dereferencing pointer to incomplete type
mongoose.c:2385: error: dereferencing pointer to incomplete type
mongoose.c: In function 'mg_modify_passwords_file':
mongoose.c:2408: error: dereferencing pointer to incomplete type
mongoose.c:2409: error: dereferencing pointer to incomplete type
mongoose.c:2410: error: dereferencing pointer to incomplete type
mongoose.c: In function 'substitute_index_file':
mongoose.c:2863: error: dereferencing pointer to incomplete type
mongoose.c:2864: error: dereferencing pointer to incomplete type
mongoose.c:2885: error: dereferencing pointer to incomplete type
mongoose.c: In function 'prepare_cgi_environment':
mongoose.c:3070: error: dereferencing pointer to incomplete type
mongoose.c:3071: error: dereferencing pointer to incomplete type
mongoose.c:3072: error: dereferencing pointer to incomplete type
mongoose.c:3073: error: dereferencing pointer to incomplete type
mongoose.c:3074: error: dereferencing pointer to incomplete type
mongoose.c:3141: error: dereferencing pointer to incomplete type
mongoose.c:3142: error: dereferencing pointer to incomplete type
mongoose.c:3145: error: dereferencing pointer to incomplete type
mongoose.c: In function 'do_ssi_include':
mongoose.c:3347: error: dereferencing pointer to incomplete type
mongoose.c:3349: error: dereferencing pointer to incomplete type
mongoose.c:3350: error: dereferencing pointer to incomplete type
mongoose.c:3374: error: dereferencing pointer to incomplete type
mongoose.c:3376: error: dereferencing pointer to incomplete type
mongoose.c:3377: error: dereferencing pointer to incomplete type
mongoose.c: In function 'analyze_request':
mongoose.c:3507: error: dereferencing pointer to incomplete type
mongoose.c:3521: error: dereferencing pointer to incomplete type
mongoose.c:3540: error: dereferencing pointer to incomplete type
mongoose.c:3548: error: dereferencing pointer to incomplete type
mongoose.c:3559: error: dereferencing pointer to incomplete type
mongoose.c: In function 'close_all_listening_sockets':
mongoose.c:3574: error: dereferencing pointer to incomplete type
mongoose.c:3575: error: dereferencing pointer to incomplete type
mongoose.c:3576: error: dereferencing pointer to incomplete type
mongoose.c: In function 'set_ports_option':
mongoose.c:3588: error: dereferencing pointer to incomplete type
mongoose.c:3593: error: dereferencing pointer to incomplete type
mongoose.c:3593: error: dereferencing pointer to incomplete type
mongoose.c:3595: error: dereferencing pointer to incomplete type
mongoose.c:3596: error: dereferencing pointer to incomplete type
mongoose.c:3596: error: dereferencing pointer to incomplete type
mongoose.c:3603: error: dereferencing pointer to incomplete type
mongoose.c:3611: error: dereferencing pointer to incomplete type
mongoose.c: In function 'log_access':
mongoose.c:3637: error: dereferencing pointer to incomplete type
mongoose.c:3638: error: dereferencing pointer to incomplete type
mongoose.c:3639: error: dereferencing pointer to incomplete type
mongoose.c:3640: error: dereferencing pointer to incomplete type
mongoose.c: In function 'mg_fini':
mongoose.c:3746: error: dereferencing pointer to incomplete type
mongoose.c:3747: error: dereferencing pointer to incomplete type
mongoose.c:3748: error: dereferencing pointer to incomplete type
mongoose.c:3748: error: dereferencing pointer to incomplete type
mongoose.c:3749: error: dereferencing pointer to incomplete type
mongoose.c:3753: error: dereferencing pointer to incomplete type
mongoose.c:3754: error: dereferencing pointer to incomplete type
mongoose.c:3757: error: dereferencing pointer to incomplete type
mongoose.c:3758: error: dereferencing pointer to incomplete type
mongoose.c:3760: warning: implicit declaration of function
'pthread_rwlock_destroy'
mongoose.c:3760: error: dereferencing pointer to incomplete type
mongoose.c:3761: error: dereferencing pointer to incomplete type
mongoose.c:3762: error: dereferencing pointer to incomplete type
mongoose.c:3763: error: dereferencing pointer to incomplete type
mongoose.c:3764: error: dereferencing pointer to incomplete type
mongoose.c:3767: error: dereferencing pointer to incomplete type
mongoose.c: In function 'set_ssl_option':
mongoose.c:3866: error: dereferencing pointer to incomplete type
mongoose.c:3867: error: dereferencing pointer to incomplete type
mongoose.c:3897: error: dereferencing pointer to incomplete type
mongoose.c: In function 'mg_set_option':
mongoose.c:4027: warning: implicit declaration of function
'pthread_rwlock_wrlock'
mongoose.c:4027: error: dereferencing pointer to incomplete type
mongoose.c:4028: error: dereferencing pointer to incomplete type
mongoose.c:4029: error: dereferencing pointer to incomplete type
mongoose.c:4030: error: dereferencing pointer to incomplete type
mongoose.c:4031: error: dereferencing pointer to incomplete type
mongoose.c: In function 'mg_get_option':
mongoose.c:4069: error: dereferencing pointer to incomplete type
mongoose.c:4072: error: dereferencing pointer to incomplete type
mongoose.c:4075: error: dereferencing pointer to incomplete type
mongoose.c:4078: error: dereferencing pointer to incomplete type
mongoose.c:4081: error: dereferencing pointer to incomplete type
mongoose.c: In function 'mg_set_callback':
mongoose.c:4090: error: dereferencing pointer to incomplete type
mongoose.c: In function 'get_socket':
mongoose.c:4283: error: dereferencing pointer to incomplete type
mongoose.c:4288: error: dereferencing pointer to incomplete type
mongoose.c:4289: error: dereferencing pointer to incomplete type
mongoose.c:4289: error: dereferencing pointer to incomplete type
mongoose.c:4291: error: dereferencing pointer to incomplete type
mongoose.c:4292: error: dereferencing pointer to incomplete type
mongoose.c:4293: error: dereferencing pointer to incomplete type
mongoose.c:4295: error: dereferencing pointer to incomplete type
mongoose.c:4299: error: dereferencing pointer to incomplete type
mongoose.c:4299: error: dereferencing pointer to incomplete type
mongoose.c:4302: error: dereferencing pointer to incomplete type
mongoose.c:4305: error: dereferencing pointer to incomplete type
mongoose.c:4305: error: dereferencing pointer to incomplete type
mongoose.c:4305: error: dereferencing pointer to incomplete type
mongoose.c:4305: error: dereferencing pointer to incomplete type
mongoose.c:4306: error: dereferencing pointer to incomplete type
mongoose.c:4312: error: dereferencing pointer to incomplete type
mongoose.c:4312: error: dereferencing pointer to incomplete type
mongoose.c:4312: error: dereferencing pointer to incomplete type
mongoose.c:4313: error: dereferencing pointer to incomplete type
mongoose.c:4313: error: dereferencing pointer to incomplete type
mongoose.c:4313: error: dereferencing pointer to incomplete type
mongoose.c:4314: error: dereferencing pointer to incomplete type
mongoose.c:4314: error: dereferencing pointer to incomplete type
mongoose.c:4314: error: dereferencing pointer to incomplete type
mongoose.c:4317: error: dereferencing pointer to incomplete type
mongoose.c:4318: error: dereferencing pointer to incomplete type
mongoose.c: In function 'worker_thread':
mongoose.c:4351: error: dereferencing pointer to incomplete type
mongoose.c:4366: error: dereferencing pointer to incomplete type
mongoose.c:4367: error: dereferencing pointer to incomplete type
mongoose.c:4368: error: dereferencing pointer to incomplete type
mongoose.c:4369: error: dereferencing pointer to incomplete type
mongoose.c:4370: error: dereferencing pointer to incomplete type
mongoose.c:4371: error: dereferencing pointer to incomplete type
mongoose.c: In function 'put_socket':
mongoose.c:4383: error: dereferencing pointer to incomplete type
mongoose.c:4386: error: dereferencing pointer to incomplete type
mongoose.c:4386: error: dereferencing pointer to incomplete type
mongoose.c:4386: error: dereferencing pointer to incomplete type
mongoose.c:4386: error: dereferencing pointer to incomplete type
mongoose.c:4387: error: dereferencing pointer to incomplete type
mongoose.c:4387: error: dereferencing pointer to incomplete type
mongoose.c:4388: error: dereferencing pointer to incomplete type
mongoose.c:4388: error: dereferencing pointer to incomplete type
mongoose.c:4388: error: dereferencing pointer to incomplete type
mongoose.c:4388: error: dereferencing pointer to incomplete type
mongoose.c:4391: error: dereferencing pointer to incomplete type
mongoose.c:4391: error: dereferencing pointer to incomplete type
mongoose.c:4391: error: dereferencing pointer to incomplete type
mongoose.c:4391: error: dereferencing pointer to incomplete type
mongoose.c:4392: error: dereferencing pointer to incomplete type
mongoose.c:4397: error: dereferencing pointer to incomplete type
mongoose.c:4398: error: dereferencing pointer to incomplete type
mongoose.c:4398: error: dereferencing pointer to incomplete type
mongoose.c:4403: error: dereferencing pointer to incomplete type
mongoose.c:4406: error: dereferencing pointer to incomplete type
mongoose.c:4407: error: dereferencing pointer to incomplete type
mongoose.c: In function 'accept_new_connection':
mongoose.c:4422: error: dereferencing pointer to incomplete type
mongoose.c:4423: error: dereferencing pointer to incomplete type
mongoose.c:4424: error: dereferencing pointer to incomplete type
mongoose.c:4425: error: dereferencing pointer to incomplete type
mongoose.c: In function 'master_thread':
mongoose.c:4447: error: dereferencing pointer to incomplete type
mongoose.c:4452: error: dereferencing pointer to incomplete type
mongoose.c:4453: error: dereferencing pointer to incomplete type
mongoose.c:4454: error: dereferencing pointer to incomplete type
mongoose.c:4455: error: dereferencing pointer to incomplete type
mongoose.c:4471: error: dereferencing pointer to incomplete type
mongoose.c:4472: error: dereferencing pointer to incomplete type
mongoose.c:4473: error: dereferencing pointer to incomplete type
mongoose.c:4473: error: dereferencing pointer to incomplete type
mongoose.c:4475: error: dereferencing pointer to incomplete type
mongoose.c:4476: error: dereferencing pointer to incomplete type
mongoose.c: In function 'mg_stop':
mongoose.c:4487: error: dereferencing pointer to incomplete type
mongoose.c:4490: error: dereferencing pointer to incomplete type
mongoose.c:4493: error: dereferencing pointer to incomplete type
mongoose.c: In function 'mg_start':
mongoose.c:4512: error: dereferencing pointer to incomplete type
mongoose.c:4519: error: dereferencing pointer to incomplete type
mongoose.c:4525: error: dereferencing pointer to incomplete type
mongoose.c:4527: error: dereferencing pointer to incomplete type
mongoose.c:4543: warning: implicit declaration of function
'pthread_rwlock_init'
mongoose.c:4543: error: dereferencing pointer to incomplete type
mongoose.c:4544: error: dereferencing pointer to incomplete type
mongoose.c:4545: error: dereferencing pointer to incomplete type
mongoose.c:4546: error: dereferencing pointer to incomplete type
mongoose.c:4547: error: dereferencing pointer to incomplete type
make: *** [linux] Error 1
I've added to the beginning of mongoose.c:
#define __USE_UNIX98 1
#include <pthread.h>
This has fixed the compile error.
Original issue reported on code.google.com by thenk...@gmail.com on 7 May 2010 at 7:41
Original issue reported on code.google.com by
thenk...@gmail.com
on 7 May 2010 at 7:41