Bug 1224977 - libcap-ng: fails to include <unistd.c> in utils/proc-llist.c. Breaks POSIX.
Summary: libcap-ng: fails to include <unistd.c> in utils/proc-llist.c. Breaks POSIX.
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: libcap-ng
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Steve Grubb
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-05-26 10:42 UTC by Anthony G. Basile
Modified: 2015-05-28 01:19 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-05-28 01:19:22 UTC
Type: Bug


Attachments (Terms of Use)
Include <unistd.h> in utils/proc-llist.c (832 bytes, text/plain)
2015-05-26 10:42 UTC, Anthony G. Basile
no flags Details

Description Anthony G. Basile 2015-05-26 10:42:00 UTC
Created attachment 1029854 [details]
Include <unistd.h> in utils/proc-llist.c

Description of problem:

utils/proc-llist.c references pid_t and uid_t types but does not include <unistd.h>. This works on Fedora which use glibc, and on embedded systems using uClibc, because of the way their headers stack.  But on musl (and possible other libc's) this fails. POSIX mandates that <unistd.h> provides these types. See Issue 6 at http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/unistd.h.html.

The attached patch fixes the problem, and was tested on systems with glibc, uclibc and musl as their C standard lib.

See also: https://bugs.gentoo.org/show_bug.cgi?id=550298

Comment 1 Steve Grubb 2015-05-26 12:18:40 UTC
What version are you talking about? I added this change specifically for musl:

https://fedorahosted.org/libcap-ng/changeset/71

This went out as version 0.7.7.

Comment 2 Anthony G. Basile 2015-05-27 22:58:59 UTC
(In reply to Steve Grubb from comment #1)
> What version are you talking about? I added this change specifically for
> musl:
> 
> https://fedorahosted.org/libcap-ng/changeset/71
> 
> This went out as version 0.7.7.

Sorry we have 0.7.5 in the Gentoo repo.  I'll bump it to 0.7.7, test and close this bug if it works.

Comment 3 Steve Grubb 2015-05-27 23:10:10 UTC
OK, good. Just a FYI, I am probably going to release 0.7.8 within the next week. It fixes a compile problem when python3 is in the build root and python3's Python.h is not.

Comment 4 Anthony G. Basile 2015-05-28 01:19:22 UTC
(In reply to Steve Grubb from comment #3)
> OK, good. Just a FYI, I am probably going to release 0.7.8 within the next
> week. It fixes a compile problem when python3 is in the build root and
> python3's Python.h is not.

0.7.7 works just fine on musl.  Thanks.  I'll watch out for 0.7.8.


Note You need to log in before you can comment on or make changes to this bug.