From c794cf10377e93989eef2f5de03fe9881e32245a Mon Sep 17 00:00:00 2001 From: "Anthony G. Basile" Date: Sat, 13 Oct 2012 23:17:12 -0400 Subject: [PATCH] Fix output when there are no --cflags or --libs to report When pkgconf parses a package for its --cflags or --libs and finds none, it returns nothing. In contrast, pkg-config [1] returns a single blank char. Packages, like rrdtool [2], assume this latter behavior and fail to configure with pkgconf. Refs. [1] http://pkgconfig.freedesktop.org/wiki/ [2] http://oss.oetiker.ch/rrdtool/ X-Gentoo-Bug: 431170 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=431170 Signed-of-by: Anthony G. Basile --- main.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/main.c b/main.c index 441e10b..19d21d0 100644 --- a/main.c +++ b/main.c @@ -309,6 +309,7 @@ apply_cflags(pkg_t *world, void *list_head, int maxdepth, unsigned int flags) pkg_fragment_t *list; unsigned int eflags = PKG_ERRF_OK; + printf(" "); list = pkg_cflags(world, head, maxdepth, flags | PKGF_SEARCH_PRIVATE, &eflags); if (list == NULL) return eflags == PKG_ERRF_OK ? true : false; @@ -326,6 +327,7 @@ apply_libs(pkg_t *world, void *list_head, int maxdepth, unsigned int flags) pkg_fragment_t *list; unsigned int eflags = PKG_ERRF_OK; + printf(" "); list = pkg_libs(world, head, maxdepth, flags, &eflags); if (list == NULL) return eflags == PKG_ERRF_OK ? true : false; -- 1.7.6.1