Bug 54275 - apr-util 1.5.1 fails to build on non-glibc system
Summary: apr-util 1.5.1 fails to build on non-glibc system
Status: RESOLVED FIXED
Alias: None
Product: APR
Classification: Unclassified
Component: APR-util (show other bugs)
Version: HEAD
Hardware: PC other
: P2 normal (vote)
Target Milestone: ---
Assignee: Apache Portable Runtime bugs mailinglist
URL:
Keywords: FixedInTrunk
Depends on:
Blocks:
 
Reported: 2012-12-10 17:28 UTC by Alan Hourihane
Modified: 2013-04-05 20:26 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alan Hourihane 2012-12-10 17:28:59 UTC
When building apr-util 1.5.1 it fails with this error....

crypto/apr_passwd.c: In function 'apr_password_validate':
crypto/apr_passwd.c:114:46: error: missing binary operator before token "("
make[1]: *** [crypto/apr_passwd.lo] Error 1

It turns out the C preprocessor is evaluating both conditions. This article shows what they needed to do to fix the problem. i.e. moving the check to two lines.

http://lists-archives.com/git/636938-simplify-strchrnul-compat-code.html
Comment 1 Stefan Fritsch 2012-12-15 23:29:31 UTC
Thanks for the report. Fix committed:

trunk: r1422413
1.5.x: r1422415
Comment 2 Alan Hourihane 2012-12-16 23:20:56 UTC
Hi Stefan,

That fix doesn't look quite right. You've now commented out the whole block for non-glibc systems, whereas the memset seems required for non-glibc systems.
Comment 3 Stefan Fritsch 2012-12-28 09:43:03 UTC
(In reply to comment #2)
> That fix doesn't look quite right. You've now commented out the whole block
> for non-glibc systems, whereas the memset seems required for non-glibc
> systems.

You are right. Thanks.

Fixed in  
trunk r1426442
1.5.x r1426445
Comment 4 Stefan Fritsch 2013-04-05 20:26:32 UTC
fixed in 1.5.2