Closed
Bug 1128184
Opened 11 years ago
Closed 10 years ago
Build with musl libc
Categories
(NSS :: Libraries, defect, P2)
NSS
Libraries
Tracking
(Not tracked)
RESOLVED
FIXED
3.20
People
(Reporter: felix.janda, Assigned: felix.janda)
References
Details
Attachments
(1 file, 2 obsolete files)
17.62 KB,
patch
|
felix.janda
:
review+
wtc
:
checked-in+
|
Details | Diff | Splinter Review |
User Agent: Mozilla/5.0 (X11; U; Unix; en-US) AppleWebKit/537.15 (KHTML, like Gecko) Chrome/24.0.1295.0 Safari/537.15 Surf/0.6
Steps to reproduce:
Try to build on a musl libc based system
http://musl-libc.org
Actual results:
Compilation failure because lib/dbm/mcom_db.h tries to include sys/cdefs.h although it does not exist.
Assignee | ||
Comment 1•11 years ago
|
||
A possible fix is to remove all support code in lib/dbm for pre-ANSI-C compilers, which is what <sys/cdefs.h> had been used for. The rest of nss will not build without an ANSI-C compiler anyway.
Assignee | ||
Comment 2•11 years ago
|
||
Forgot also to remove HAVE_CDEFS_H in the Makefile.
Attachment #8557513 -
Attachment is obsolete: true
Assignee | ||
Comment 3•10 years ago
|
||
To document the patch:
* expand __P(x) to x (valid on ANSI C)
* expand __BEGIN_DECLS and __END_DECLS
* remove code behind #ifndef __STDC__
* remove all references to cdefs.h
(snprintf() in snprintf.c is a nice example for the difference between function declarations in K&R and ANSI C.)
Assignee | ||
Updated•10 years ago
|
Attachment #8557573 -
Flags: review?(kaie)
Assignee | ||
Updated•10 years ago
|
Attachment #8557573 -
Flags: review?(kaie) → review?(wtc)
Comment 4•10 years ago
|
||
Hi Felix,
Thanks for the patch. I made the following two changes to your patch.
1. I removed the space before the __P macros.
2. I found that the mpool.h header, which uses the __BEGIN_DECLS and
__END_DECLS macros, is not used. So I simply removed it.
Please review and test this patch. Thanks.
Assignee: nobody → wtc
Attachment #8557573 -
Attachment is obsolete: true
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Attachment #8557573 -
Flags: review?(wtc)
Attachment #8625378 -
Flags: review?(felix.janda)
Assignee | ||
Comment 5•10 years ago
|
||
Comment on attachment 8625378 [details] [diff] [review]
Remove support for pre-ANSI-C compilers, v2, by Felix Janda
Review of attachment 8625378 [details] [diff] [review]:
-----------------------------------------------------------------
Looks good to me and builds fine. Thanks!
Attachment #8625378 -
Flags: review?(felix.janda) → review+
Comment 6•10 years ago
|
||
Comment on attachment 8625378 [details] [diff] [review]
Remove support for pre-ANSI-C compilers, v2, by Felix Janda
Thanks for the review. Patch checked in to the NSS repository:
https://hg.mozilla.org/projects/nss/rev/1c628bb28ce0
Attachment #8625378 -
Flags: checked-in+
Updated•10 years ago
|
Assignee: wtc → felix.janda
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Component: Build → Libraries
Priority: -- → P2
Resolution: --- → FIXED
Target Milestone: --- → 3.20
You need to log in
before you can comment on or make changes to this bug.
Description
•