Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 538710 Details for
Bug 660608
=sys-libs/libcap-2.25: cap_text.c:291:2: warning: implicit declaration of function ‘asprintf’; did you mean ‘vsprintf’? [-Wimplicit-function-declaration]
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
0001-cap_text.c-fix-asprintf-implicit-declaration.patch
0001-cap_text.c-fix-asprintf-implicit-declaration.patch (text/plain), 1.77 KB, created by
Sergei Trofimovich (RETIRED)
on 2018-07-07 18:02:12 UTC
(
hide
)
Description:
0001-cap_text.c-fix-asprintf-implicit-declaration.patch
Filename:
MIME Type:
Creator:
Sergei Trofimovich (RETIRED)
Created:
2018-07-07 18:02:12 UTC
Size:
1.77 KB
patch
obsolete
>From 7d5ef64d8db4bd5b349b4a5a511c417543c0b917 Mon Sep 17 00:00:00 2001 >From: Sergei Trofimovich <slyfox@gentoo.org> >Date: Tue, 1 Aug 2017 09:05:31 +0100 >Subject: [resend libcap: PATCH] cap_text.c: fix 'asprintf' implicit declaration > >Detected by gcc: > cap_text.c: In function 'cap_to_name': > cap_text.c:291:2: warning: implicit declaration of function 'asprintf'; > did you mean 'vsprintf'? [-Wimplicit-function-declaration] > asprintf(&tmp, "%u", cap); > ^~~~~~~~ > vsprintf > >In order to get 'asprintf' declaration '_GNU_SOURCE' needs to be defined >before '<stdio.h>' is included. > >'cap_text.c' injects '<stdio.h>' include as '-include _caps_output.gperf' >(via '<string.h>') before '_GNU_SOURCE' is defined in source file. > >The change moves '_caps_output.gperf' inclusion after '_GNU_SOURCE' >declaration. > >Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org> >--- > libcap/Makefile | 2 +- > libcap/cap_text.c | 5 +++++ > 2 files changed, 6 insertions(+), 1 deletion(-) > >diff --git a/libcap/Makefile b/libcap/Makefile >index d189777..a85beba 100644 >--- a/libcap/Makefile >+++ b/libcap/Makefile >@@ -22,7 +22,7 @@ all: $(MINLIBNAME) $(STALIBNAME) libcap.pc > > ifeq ($(BUILD_GPERF),yes) > USE_GPERF_OUTPUT = $(GPERF_OUTPUT) >-INCLUDE_GPERF_OUTPUT = -include $(GPERF_OUTPUT) >+INCLUDE_GPERF_OUTPUT = -DINCLUDE_GPERF_OUTPUT='"$(GPERF_OUTPUT)"' > endif > > libcap.pc: libcap.pc.in >diff --git a/libcap/cap_text.c b/libcap/cap_text.c >index 42fb685..29fc73f 100644 >--- a/libcap/cap_text.c >+++ b/libcap/cap_text.c >@@ -15,6 +15,11 @@ > #include <ctype.h> > #include <limits.h> > >+#ifdef INCLUDE_GPERF_OUTPUT >+/* we need to include it after #define _GNU_SOURCE is set */ >+#include INCLUDE_GPERF_OUTPUT >+#endif >+ > /* Maximum output text length (16 per cap) */ > #define CAP_TEXT_SIZE (16*__CAP_MAXBITS) > >-- >2.13.3 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 660608
: 538710