]> git.pld-linux.org Git - packages/python-parted.git/blobdiff - gcc10.patch
upstream patch to fix build with gcc 10; rel 3
[packages/python-parted.git] / gcc10.patch
diff --git a/gcc10.patch b/gcc10.patch
new file mode 100644 (file)
index 0000000..3cc25b6
--- /dev/null
@@ -0,0 +1,101 @@
+From 104ca13567c08c1188b126a395c4602841aae2c6 Mon Sep 17 00:00:00 2001
+From: David Cantrell <dcantrell@redhat.com>
+Date: Tue, 11 Feb 2020 11:24:08 -0500
+Subject: [PATCH] Move exception declarations to _pedmodule.c
+
+Change the definitions in exceptions.h to extern declarations.  This
+is correct and what I was doing was just lazy.  gcc 10 defaults to
+-fno-common now.
+---
+ include/exceptions.h | 32 ++++++++++++++++----------------
+ src/_pedmodule.c     | 20 +++++++++++++++++++-
+ 2 files changed, 35 insertions(+), 17 deletions(-)
+
+diff --git a/include/exceptions.h b/include/exceptions.h
+index 2a3e1f5..b548214 100644
+--- a/include/exceptions.h
++++ b/include/exceptions.h
+@@ -1,7 +1,7 @@
+ /*
+  * exceptions.h
+  *
+- * Copyright (C) 2007-2013 Red Hat, Inc.
++ * Copyright (C) 2007-2020 Red Hat, Inc.
+  *
+  * This copyrighted material is made available to anyone wishing to use,
+  * modify, copy, or redistribute it subject to the terms and conditions of
+@@ -27,21 +27,21 @@
+ #include <Python.h>
+ /* custom exceptions for _ped */
+-PyObject *AlignmentException;
+-PyObject *CreateException;
+-PyObject *ConstraintException;
+-PyObject *DeviceException;
+-PyObject *DiskException;
+-PyObject *DiskLabelException;
+-PyObject *FileSystemException;
+-PyObject *GeometryException;
+-PyObject *IOException;
+-PyObject *NotNeededException;
+-PyObject *PartedException;
+-PyObject *PartitionException;
+-PyObject *TimerException;
+-PyObject *UnknownDeviceException;
+-PyObject *UnknownTypeException;
++extern PyObject *AlignmentException;
++extern PyObject *CreateException;
++extern PyObject *ConstraintException;
++extern PyObject *DeviceException;
++extern PyObject *DiskException;
++extern PyObject *DiskLabelException;
++extern PyObject *FileSystemException;
++extern PyObject *GeometryException;
++extern PyObject *IOException;
++extern PyObject *NotNeededException;
++extern PyObject *PartedException;
++extern PyObject *PartitionException;
++extern PyObject *TimerException;
++extern PyObject *UnknownDeviceException;
++extern PyObject *UnknownTypeException;
+ extern unsigned int partedExnRaised;
+ extern char *partedExnMessage;
+diff --git a/src/_pedmodule.c b/src/_pedmodule.c
+index 3e98788..6c26747 100644
+--- a/src/_pedmodule.c
++++ b/src/_pedmodule.c
+@@ -5,7 +5,7 @@
+  * Python module that implements the libparted functionality via Python
+  * classes and other high level language features.
+  *
+- * Copyright (C) 2007-2015 Red Hat, Inc.
++ * Copyright (C) 2007-2020 Red Hat, Inc.
+  *
+  * This copyrighted material is made available to anyone wishing to use,
+  * modify, copy, or redistribute it subject to the terms and conditions of
+@@ -59,6 +59,24 @@ unsigned int partedExnRaised = 0;
+ PyObject *exn_handler = NULL;
++/* custom exceptions for _ped */
++/* These are declared in exceptions.h for use elsewhere. */
++PyObject *AlignmentException;
++PyObject *CreateException;
++PyObject *ConstraintException;
++PyObject *DeviceException;
++PyObject *DiskException;
++PyObject *DiskLabelException;
++PyObject *FileSystemException;
++PyObject *GeometryException;
++PyObject *IOException;
++PyObject *NotNeededException;
++PyObject *PartedException;
++PyObject *PartitionException;
++PyObject *TimerException;
++PyObject *UnknownDeviceException;
++PyObject *UnknownTypeException;
++
+ /* Docs strings are broken out of the module structure here to be at least a
+  * little bit readable.
+  */
This page took 0.15432 seconds and 4 git commands to generate.