Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 253786 - sys-devel/distcc-3*: build fails with -D_FORTIFY_SOURCE=2 (patch supplied)
Summary: sys-devel/distcc-3*: build fails with -D_FORTIFY_SOURCE=2 (patch supplied)
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: MATSUU Takuto (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: fortify-source
  Show dependency tree
 
Reported: 2009-01-04 21:46 UTC by Kevin Pyle
Modified: 2009-02-18 00:21 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Patch for src/snprintf.h to include config.h so that it does not declare snprintf unnecessarily (distcc-3.0-fix-fortify.patch,313 bytes, patch)
2009-01-04 21:47 UTC, Kevin Pyle
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kevin Pyle 2009-01-04 21:46:34 UTC
Header src/snprintf.h declares prototypes for snprintf and friends if configure did not detect that the system provides them.  When -D_FORTIFY_SOURCE=2 is passed, these symbols are mangled by macro magic in the system headers.  The configure script correctly detects that the Linux system headers provide these symbols.  The problem is that src/emaillog.c indirectly includes src/snprintf.h without ever including config.h.  Thus, the conditional tests performed in src/snprintf.h incorrectly decide to include the distcc-supplied prototypes, causing the build to fail.  The fix is simple: always have config.h included before src/snprintf.h checks the configure-created conditionals.  I will attach a patch that does this.

This bug is filed as "Core system" since the description says that ebuilds for sys-*/ go in "Core system".

Both sys-devel/distcc-3.04 and sys-devel/distcc-3.1 are affected, and the patch applies cleanly to both versions.
Comment 1 Kevin Pyle 2009-01-04 21:47:51 UTC
Created attachment 177411 [details, diff]
Patch for src/snprintf.h to include config.h so that it does not declare snprintf unnecessarily
Comment 2 MATSUU Takuto (RETIRED) gentoo-dev 2009-02-10 00:09:41 UTC
fixed in cvs. thanks