From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/675 Path: news.gmane.org!not-for-mail From: Isaac Dunham Newsgroups: gmane.linux.lib.musl.general Subject: FTBFS on i386: aio_cancel.c relies on macro-protected defines in aio.h Date: Tue, 3 Apr 2012 16:09:25 -0700 Message-ID: <20120403160925.745f0985@newbook> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1333494582 14549 80.91.229.3 (3 Apr 2012 23:09:42 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 3 Apr 2012 23:09:42 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-676-gllmg-musl=m.gmane.org@lists.openwall.com Wed Apr 04 01:09:41 2012 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1SFCr6-0008BC-Ug for gllmg-musl@plane.gmane.org; Wed, 04 Apr 2012 01:09:41 +0200 Original-Received: (qmail 3454 invoked by uid 550); 3 Apr 2012 23:09:40 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 3443 invoked from network); 3 Apr 2012 23:09:40 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=lavabit; d=lavabit.com; b=z1Q1eqeepRZ9iVP1fUXGcluGsfhwPU1cxbpMUwis5v5Z7UpavbK4M62OQy71rB5VzNsBmbyhn9YlwYHtTyAgs98DxefYOeFVSFia+N9K/lRWCe4KXnTA6xkwFF7dLkL7c8FUt0V8JV101m/q4srrTeyCJEltEI8f+ZPOibnIovA=; h=Date:From:To:Subject:Message-ID:X-Mailer:Mime-Version:Content-Type:Content-Transfer-Encoding; X-Mailer: Claws Mail 3.7.4 (GTK+ 2.20.1; i486-pc-linux-gnu) Xref: news.gmane.org gmane.linux.lib.musl.general:675 Archived-At: aio_cancel.c won't build. It seems one of the _*_SOURCE macros must be defined to build it, and I'm not sure which one (guessing it's _POSIX_SOURCE or _XOPEN_SOURCE ?). Following is the relevant output from make: --- cc -fno-stack-protector -I./src/internal -I./include -I./arch/i386 -c -o src/aio/aio_cancel.o src/aio/aio_cancel.c src/aio/aio_cancel.c:5: warning: =E2=80=98struct aiocb=E2=80=99 declared inside parameter list src/aio/aio_cancel.c:5: warning: its scope is only this definition or declaration, which is probably not what you want src/aio/aio_cancel.c: In function =E2=80=98aio_cancel=E2=80=99: src/aio/aio_cancel.c:13: error: =E2=80=98AIO_NOTCANCELED=E2=80=99 undeclared (first use in this function) src/aio/aio_cancel.c:13: error: (Each undeclared identifier is reported only once src/aio/aio_cancel.c:13: error: for each function it appears in.) src/aio/aio_cancel.c:15: error: dereferencing pointer to incomplete type src/aio/aio_cancel.c:15: error: =E2=80=98AIO_ALLDONE=E2=80= =99 undeclared (first use in this function) make: *** [src/aio/aio_cancel.o] Error 1 --- aio_cancel.c #include's aio.h, which does define these macros...if appropriate defines were passed. Relevant portions of aio.h: --- #if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \ || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) /* a few lines omitted */ struct aiocb { int aio_fildes, aio_lio_opcode, aio_reqprio; volatile void *aio_buf; size_t aio_nbytes; struct sigevent aio_sigevent; void *__td; int __lock[2]; int __err; ssize_t __ret; off_t aio_offset; void *__next, *__prev; char __dummy4[32-2*sizeof(void *)]; }; #define AIO_CANCELED 0 #define AIO_NOTCANCELED 1 #define AIO_ALLDONE 2 /* several more lines */ #endif /* _*_SOURCE */ ---- Just out of curiosity, is there a reason to macro-protect headers that are not part of ANSI C when all other flavors support them? Isaac Dunham