Bug 32379

Summary: c99ism in v0.25
Product: pkg-config Reporter: Hauke Fath <hauke>
Component: srcAssignee: Tollef Fog Heen <tfheen>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: All   
OS: NetBSD   
Whiteboard:
i915 platform: i915 features:

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.