Summary: | sys-fs/ncdu-1.11 build fix on sys-libs/uclibc | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | René Rhéaume <rene.rheaume> |
Component: | Current packages | Assignee: | Wolfram Schlich (RETIRED) <wschlich> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | AMD64 | ||
OS: | Linux | ||
URL: | http://dev.yorhel.nl/ncdu/bug/70 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
ncdu-1.11-uclibc.patch
ncdu-1.11.ebuild.patch |
Created attachment 403874 [details, diff]
ncdu-1.11.ebuild.patch
(In reply to René Rhéaume from comment #0) > Created attachment 403872 [details, diff] [details, diff] > ncdu-1.11-uclibc.patch > > ncdu 1.11 misses an include file to be buildable on uclibc-based systems. > The following patch adds the missing include. Actually this is not the correct way to deal with this. Take a look at `man 3 system`. There we see: SYNOPSIS #include <stdlib.h> int system(const char *command); ... NOTES If the _XOPEN_SOURCE feature test macro is defined (before including any header files), then the macros described in waitpid(2) (WEXITSTATUS(), etc.) are made available when including <stdlib.h>. In src/shell.c, <stdlib.h> is included, but _XOPEN_SOURCE is not defined. Yet the code does the following around line 60: res = system(shell); ... if (res == -1 || !WIFEXITED(res) || WEXITSTATUS(res) == 127) { Defining _XOPEN_SOURCE fixes it. Take a look at uclibc's <stdlib.h> around line 42. @wschlich I'll open a bug upstream and take care of this one. I don't want to burdon devs with uclibc stuff. We should backport the usptream fix: http://g.blicky.net/ncdu.git/commit/?id=29f347c19cb7ad17c4b401e1d984fce8eafaaafa @wschlich. May I go ahead and commit? (In reply to Anthony Basile from comment #3) > We should backport the usptream fix: > > http://g.blicky.net/ncdu.git/commit/ > ?id=29f347c19cb7ad17c4b401e1d984fce8eafaaafa > > @wschlich. May I go ahead and commit? @wschlich, ping I backported the patch to 1.11 without rev bump. |
Created attachment 403872 [details, diff] ncdu-1.11-uclibc.patch ncdu 1.11 misses an include file to be buildable on uclibc-based systems. The following patch adds the missing include.