diff options
author | Matthew Waters <matthew@centricular.com> | 2020-09-23 19:00:09 +1000 |
---|---|---|
committer | GStreamer Merge Bot <gitlab-merge-bot@gstreamer-foundation.org> | 2020-09-23 12:18:22 +0000 |
commit | bd4773c3c095044d3f996fcbc90cfe419383084f (patch) | |
tree | 0a9a2fece69c74f36d5d6916186342ed026c716f | |
parent | 60c5e7f9c0e05653dfd3e304c0ee0b5bc8f3f54e (diff) |
reciped/gperf: fix build with XCode 12
XCode 12 will now error by default for implicit function declarations
Part-of: <https://gitlab.freedesktop.org/gstreamer/cerbero/-/merge_requests/614>
-rw-r--r-- | recipes/build-tools/gperf-0001-workaround-implcit-function-declaration-warnings.patch | 38 | ||||
-rw-r--r-- | recipes/build-tools/gperf.recipe | 3 |
2 files changed, 40 insertions, 1 deletions
diff --git a/recipes/build-tools/gperf-0001-workaround-implcit-function-declaration-warnings.patch b/recipes/build-tools/gperf-0001-workaround-implcit-function-declaration-warnings.patch new file mode 100644 index 00000000..294590f4 --- /dev/null +++ b/recipes/build-tools/gperf-0001-workaround-implcit-function-declaration-warnings.patch @@ -0,0 +1,38 @@ +From cbaaecbe00285b7cd4122680610fca69fed29da7 Mon Sep 17 00:00:00 2001 +From: Matthew Waters <matthew@centricular.com> +Date: Wed, 23 Sep 2020 15:02:28 +1000 +Subject: [PATCH] workaround implcit-function-declaration warnings + +On all the platforms we care about, we have all of +string.h, stdlib.h, stdio.h so just always include them + +Fixes compile error with XCode 12 +--- + lib/getopt.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/lib/getopt.c b/lib/getopt.c +index 32d6efc..ff293b9 100644 +--- a/lib/getopt.c ++++ b/lib/getopt.c +@@ -60,7 +60,7 @@ + + /* This needs to come after some library #include + to get __GNU_LIBRARY__ defined. */ +-#ifdef __GNU_LIBRARY__ ++#if 1 + /* Don't include stdlib.h for non-GNU C libraries because some of them + contain conflicting prototypes for getopt. */ + #include <stdlib.h> +@@ -187,7 +187,7 @@ static enum + /* Value of POSIXLY_CORRECT environment variable. */ + static char *posixly_correct; + +-#ifdef __GNU_LIBRARY__ ++#if 1 + /* We want to avoid inclusion of string.h with non-GNU libraries + because there are many ways it can cause trouble. + On some systems, it contains special magic macros that don't work +-- +2.24.3 (Apple Git-128) + diff --git a/recipes/build-tools/gperf.recipe b/recipes/build-tools/gperf.recipe index 0bf541ab..8f7e7434 100644 --- a/recipes/build-tools/gperf.recipe +++ b/recipes/build-tools/gperf.recipe @@ -8,7 +8,8 @@ class Recipe(recipe.Recipe): stype = SourceType.TARBALL url = 'gnu://.tar.gz' tarball_checksum = '767112a204407e62dbc3106647cf839ed544f3cf5d0f0523aaa2508623aad63e' - patches = ['gperf-0001-Don-t-override-environment-AR.patch'] + patches = ['gperf-0001-Don-t-override-environment-AR.patch', + 'gperf-0001-workaround-implcit-function-declaration-warnings.patch'] files_bins = ['gperf'] |