From 0c564e103d8240a997ee43965fa749bf816ea486 Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Mon, 8 Sep 2014 09:37:27 +0200 Subject: build: Change return type of main in configure compile test programs When running the configure script with `CC=clang ./configure' clang fails all the compile test programs due to the main() function not having return type int. Change it, so we can use clang as a compiler in the configure script. Signed-off-by: Tobias Klauser --- configure | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'configure') diff --git a/configure b/configure index 1ac21be..fa60764 100755 --- a/configure +++ b/configure @@ -155,7 +155,7 @@ check_libnl() # error incompatible libnl version #endif -void main(void) +int main(void) { struct nl_sock *sock = nl_socket_alloc(); struct nl_cache *nl_cache; @@ -191,7 +191,7 @@ check_tpacket_v3() #include #include -void main(void) +int main(void) { struct tpacket3_hdr *hdr; int foo[] = { @@ -220,7 +220,7 @@ check_tpacket_v2() #include #include -void main(void) +int main(void) { struct tpacket2_hdr *hdr; int foo[] = { @@ -254,7 +254,7 @@ check_ncurses() cat > $TMPDIR/ncursestest.c << EOF #include -void main(void) +int main(void) { WINDOW *screen = initscr(); } @@ -284,7 +284,7 @@ check_libgeoip() #include #include -void main(void) +int main(void) { int dbs[] = { GEOIP_CITY_EDITION_REV1, @@ -318,7 +318,7 @@ check_libnf_ct() #include #include -void main(void) +int main(void) { struct nf_conntrack *ct; const uint32_t id = nfct_get_attr_u32(ct, ATTR_ID); @@ -342,7 +342,7 @@ check_zlib() cat > $TMPDIR/ztest.c << EOF #include "zlib.h" -void main(void) +int main(void) { gzFile fp = gzopen("foo.gz", "rb"); } @@ -369,7 +369,7 @@ check_urcu() cat > $TMPDIR/urcutest.c << EOF #include -void main(void) +int main(void) { rcu_init(); synchronize_rcu(); @@ -393,7 +393,7 @@ check_libpcap() cat > $TMPDIR/pcaptest.c << EOF #include -void main(void) +int main(void) { struct bpf_program bpf; int ret = pcap_compile_nopcap(65535, 1, &bpf, "foo.bpf", 1, 0xffffffff); @@ -429,7 +429,7 @@ check_hwtstamp() #include #include -void main(void) +int main(void) { int timesource = SOF_TIMESTAMPING_RAW_HARDWARE, ret; int sock = socket(PF_PACKET, SOCK_RAW, htons(ETH_P_ALL)); @@ -469,7 +469,7 @@ check_libcli() #include #include -void main(void) +int main(void) { struct cli_def *cli = cli_init(); } @@ -492,7 +492,7 @@ check_libnet() cat > $TMPDIR/nettest.c << EOF #include -void main(void) +int main(void) { char err_buf[LIBNET_ERRBUF_SIZE]; libnet_t *l = libnet_init(LIBNET_LINK_ADV, "ethX", err_buf); -- cgit v1.2.3-54-g00ecf