From 014828b918974ca26dac59375f66dbb059a10751 Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Mar 09 2018 14:34:53 +0000 Subject: trivial: rename patch --- diff --git a/0001-m4-disable-Wcast-function-type.patch b/0001-m4-disable-Wcast-function-type.patch deleted file mode 100644 index 4730622..0000000 --- a/0001-m4-disable-Wcast-function-type.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 9777492dde8ad40882b804fcda332cb3e1f46271 Mon Sep 17 00:00:00 2001 -From: Lubomir Rintel -Date: Wed, 7 Feb 2018 11:23:08 +0100 -Subject: [PATCH] m4: disable -Wcast-function-type - -This fixes the GCC 8 build. It disables the warning conditionally so that we -get the warning back if glib gets fixed. - -(cherry picked from commit 631982a796a0eeb412551c61469a1cfb83e3f438) ---- - m4/compiler_options.m4 | 10 ++++++++++ - 1 file changed, 10 insertions(+) - -diff --git a/m4/compiler_options.m4 b/m4/compiler_options.m4 -index ccb51f5e6..2350571e2 100644 ---- a/m4/compiler_options.m4 -+++ b/m4/compiler_options.m4 -@@ -127,6 +127,16 @@ if test "$GCC" = "yes" -a "$set_more_warnings" != "no"; then - [union { int a[1]; int b[2]; } c = { 0 }] - ) - -+ dnl a new warning in gcc 8, glib 2.55 doesn't play nice yet -+ NM_COMPILER_WARNING([cast-function-type], -+ [#include ] -+ [typedef struct { GObject parent; } NMObject;] -+ [typedef struct { GObjectClass parent; } NMObjectClass;] -+ [static void nm_object_init (NMObject *object) { } ] -+ [static void nm_object_class_init (NMObjectClass *object) { }] -+ [G_DEFINE_TYPE (NMObject, nm_object, G_TYPE_OBJECT)] -+ ) -+ - CFLAGS="$CFLAGS_MORE_WARNINGS $CFLAGS" - else - AC_MSG_RESULT(no) --- -2.14.3 - diff --git a/0003-m4-disable-Wcast-function-type.patch b/0003-m4-disable-Wcast-function-type.patch new file mode 100644 index 0000000..4730622 --- /dev/null +++ b/0003-m4-disable-Wcast-function-type.patch @@ -0,0 +1,37 @@ +From 9777492dde8ad40882b804fcda332cb3e1f46271 Mon Sep 17 00:00:00 2001 +From: Lubomir Rintel +Date: Wed, 7 Feb 2018 11:23:08 +0100 +Subject: [PATCH] m4: disable -Wcast-function-type + +This fixes the GCC 8 build. It disables the warning conditionally so that we +get the warning back if glib gets fixed. + +(cherry picked from commit 631982a796a0eeb412551c61469a1cfb83e3f438) +--- + m4/compiler_options.m4 | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +diff --git a/m4/compiler_options.m4 b/m4/compiler_options.m4 +index ccb51f5e6..2350571e2 100644 +--- a/m4/compiler_options.m4 ++++ b/m4/compiler_options.m4 +@@ -127,6 +127,16 @@ if test "$GCC" = "yes" -a "$set_more_warnings" != "no"; then + [union { int a[1]; int b[2]; } c = { 0 }] + ) + ++ dnl a new warning in gcc 8, glib 2.55 doesn't play nice yet ++ NM_COMPILER_WARNING([cast-function-type], ++ [#include ] ++ [typedef struct { GObject parent; } NMObject;] ++ [typedef struct { GObjectClass parent; } NMObjectClass;] ++ [static void nm_object_init (NMObject *object) { } ] ++ [static void nm_object_class_init (NMObjectClass *object) { }] ++ [G_DEFINE_TYPE (NMObject, nm_object, G_TYPE_OBJECT)] ++ ) ++ + CFLAGS="$CFLAGS_MORE_WARNINGS $CFLAGS" + else + AC_MSG_RESULT(no) +-- +2.14.3 + diff --git a/NetworkManager.spec b/NetworkManager.spec index d95c0d7..a199aa7 100644 --- a/NetworkManager.spec +++ b/NetworkManager.spec @@ -93,7 +93,7 @@ Source3: 20-connectivity-fedora.conf #Patch1: 0001-some.patch Patch1: 0001-build-fix-configure-check-for-CC-support-of-_Generic.patch Patch2: 0002-ovs-fix-compiler-error-for-passing-NMDevice-pointer-.patch -Patch3: 0001-m4-disable-Wcast-function-type.patch +Patch3: 0003-m4-disable-Wcast-function-type.patch Requires(post): systemd Requires(preun): systemd