diff options
author | Michael Olbrich <m.olbrich@pengutronix.de> | 2018-12-06 07:54:53 +0100 |
---|---|---|
committer | Michael Olbrich <m.olbrich@pengutronix.de> | 2018-12-06 12:53:28 +0100 |
commit | 51a507e477a28a508af081e1bf6352b3f6c60fc2 (patch) | |
tree | bf6197cc2cdedf5fb33a0f93b62fb544ecd0a6a1 /patches | |
parent | 5c9c4ca6924abb8c90fcfadcd9a6cada3ebd416a (diff) | |
download | ptxdist-51a507e477a28a508af081e1bf6352b3f6c60fc2.tar.gz ptxdist-51a507e477a28a508af081e1bf6352b3f6c60fc2.tar.xz |
atop: add upstream patch to build with gcc-8.x
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Diffstat (limited to 'patches')
-rw-r--r-- | patches/atop-2.3.0/0001-Include-sysmacros.h-to-compile-with-newer-gcc.patch | 46 | ||||
-rw-r--r-- | patches/atop-2.3.0/series | 4 |
2 files changed, 50 insertions, 0 deletions
diff --git a/patches/atop-2.3.0/0001-Include-sysmacros.h-to-compile-with-newer-gcc.patch b/patches/atop-2.3.0/0001-Include-sysmacros.h-to-compile-with-newer-gcc.patch new file mode 100644 index 000000000..0d47cdd4e --- /dev/null +++ b/patches/atop-2.3.0/0001-Include-sysmacros.h-to-compile-with-newer-gcc.patch @@ -0,0 +1,46 @@ +From: SjonHortensius <SjonHortensius@users.noreply.github.com> +Date: Fri, 24 Aug 2018 18:26:58 +0200 +Subject: [PATCH] Include sysmacros.h to compile with newer gcc +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Older gcc throws a warning +``` +photosyst.c: In function 'lvmmapname': +photosyst.c:1465:13: warning: In the GNU C Library, "major" is defined + by <sys/sysmacros.h>. For historical compatibility, it is + currently defined by <sys/types.h> as well, but we plan to + remove this soon. To use "major", include <sys/sysmacros.h> + directly. If you did not intend to use a system-defined macro + "major", you should undefine it after including <sys/types.h>. + dmp->major = major(statbuf.st_rdev); +``` + +Newer gcc throws an error: + +``` +photosyst.c: In function ‘lvmmapname’: +photosyst.c:1482:19: error: called object ‘major’ is not a function or function pointer + dmp->major = major(statbuf.st_rdev); + ^~~~~ +photosyst.c:1437:25: note: declared here + lvmmapname(unsigned int major, unsigned int minor, + ~~~~~~~~~~~~~^~~~~ +``` +--- + photosyst.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/photosyst.c b/photosyst.c +index 38828ec498a5..caed3529ae27 100644 +--- a/photosyst.c ++++ b/photosyst.c +@@ -152,6 +152,7 @@ + static const char rcsid[] = "$Id: photosyst.c,v 1.38 2010/11/19 07:40:40 gerlof Exp $"; + + #include <sys/types.h> ++#include <sys/sysmacros.h> + #include <stdio.h> + #include <string.h> + #include <unistd.h> diff --git a/patches/atop-2.3.0/series b/patches/atop-2.3.0/series new file mode 100644 index 000000000..95bd83266 --- /dev/null +++ b/patches/atop-2.3.0/series @@ -0,0 +1,4 @@ +# generated by git-ptx-patches +#tag:base --start-number 1 +0001-Include-sysmacros.h-to-compile-with-newer-gcc.patch +# 7ac7bb46bb4801fb2be3b7d3f950bbd3 - git-ptx-patches magic |