Bug 32379 - c99ism in v0.25
Summary: c99ism in v0.25
Status: RESOLVED FIXED
Alias: None
Product: pkg-config
Classification: Unclassified
Component: src (show other bugs)
Version: unspecified
Hardware: All NetBSD
: medium normal
Assignee: Tollef Fog Heen
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-14 04:25 UTC by Hauke Fath
Modified: 2011-04-13 11:30 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Hauke Fath 2010-12-14 04:25:15 UTC
Version 0.25 of pkg-config does not build on NetBSD 1.5 (that's gcc 2.9x) because of a {c++,c99}ism - c89 wants declarations at the beginning of a block, only.

The following patch fixes the problem:

<snip>
--- parse.c.orig        2010-05-27 20:21:36.000000000 +0000
+++ parse.c
@@ -880,8 +880,10 @@ parse_cflags (Package *pkg, const char *
             pkg->other_cflags = g_slist_prepend (pkg->other_cflags,
                                                  g_strdup (arg));
          if (strcmp("-idirafter", arg) == 0) {
+             char *n;
+                 
               tmp = trim_string(argv[++i]);
-             char *n = strdup_escape_shell(tmp);
+             n = strdup_escape_shell(tmp);
              pkg->other_cflags = g_slist_prepend(pkg->other_cflags, n);
              g_free(tmp);
          }
</snip>
Comment 1 Tollef Fog Heen 2011-04-13 11:30:37 UTC
Thanks, fixed in 5764fbe87327d091b369afa857d9113a88355a80.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.