Bug 54275

Summary: apr-util 1.5.1 fails to build on non-glibc system
Product: APR Reporter: Alan Hourihane <alanh>
Component: APR-utilAssignee: Apache Portable Runtime bugs mailinglist <bugs>
Status: RESOLVED FIXED    
Severity: normal Keywords: FixedInTrunk
Priority: P2    
Version: HEAD   
Target Milestone: ---   
Hardware: PC   
OS: other   

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