diff options
author | Yuri Victorovich <yuri@FreeBSD.org> | 2020-09-27 10:39:06 +0000 |
---|---|---|
committer | Yuri Victorovich <yuri@FreeBSD.org> | 2020-09-27 10:39:06 +0000 |
commit | ad505c9d584b0e6a01c40d7c23b809b1f28537fe (patch) | |
tree | 56842b9ecb732a75001ccf0ba1baeda31b78dbe6 | |
parent | Pass maintainership to Neel Chauhan (diff) |
misc/librepo: Fix SEGV by patching sources to make 2 functions be properly declared and called.
-rw-r--r-- | misc/librepo/Makefile | 2 | ||||
-rw-r--r-- | misc/librepo/files/patch-librepo_downloader.c | 11 | ||||
-rw-r--r-- | misc/librepo/files/patch-librepo_yum.c | 15 |
3 files changed, 24 insertions, 4 deletions
diff --git a/misc/librepo/Makefile b/misc/librepo/Makefile index b93138b82cf3..58f61b28391f 100644 --- a/misc/librepo/Makefile +++ b/misc/librepo/Makefile @@ -2,7 +2,7 @@ PORTNAME= librepo DISTVERSION= 1.12.1 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= misc MAINTAINER= yuri@FreeBSD.org diff --git a/misc/librepo/files/patch-librepo_downloader.c b/misc/librepo/files/patch-librepo_downloader.c index ed1fdc00ada9..70864fcfeb83 100644 --- a/misc/librepo/files/patch-librepo_downloader.c +++ b/misc/librepo/files/patch-librepo_downloader.c @@ -1,13 +1,18 @@ +https://github.com/rpm-software-management/librepo/issues/200 + --- librepo/downloader.c.orig 2020-08-22 20:15:59 UTC +++ librepo/downloader.c @@ -18,9 +18,11 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +-#define _XOPEN_SOURCE 500 // Because of fdopen() and ftruncate() +-#define _DEFAULT_SOURCE // Because of futimes() +-#define _BSD_SOURCE // Because of futimes() +#if __FreeBSD__ - #define _XOPEN_SOURCE 500 // Because of fdopen() and ftruncate() - #define _DEFAULT_SOURCE // Because of futimes() - #define _BSD_SOURCE // Because of futimes() ++//#define _XOPEN_SOURCE 500 // Because of fdopen() and ftruncate() ++//#define _DEFAULT_SOURCE // Because of futimes() ++//#define _BSD_SOURCE // Because of futimes() +#endif #include <glib.h> diff --git a/misc/librepo/files/patch-librepo_yum.c b/misc/librepo/files/patch-librepo_yum.c new file mode 100644 index 000000000000..e2350a2501fc --- /dev/null +++ b/misc/librepo/files/patch-librepo_yum.c @@ -0,0 +1,15 @@ +Otherwise realpath(3) declaration isn't found: https://github.com/rpm-software-management/librepo/issues/202 + +--- librepo/yum.c.orig 2020-09-27 10:18:54 UTC ++++ librepo/yum.c +@@ -18,8 +18,8 @@ + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +-#define _POSIX_SOURCE +-#define _DEFAULT_SOURCE ++//#define _POSIX_SOURCE ++//#define _DEFAULT_SOURCE + #define BITS_IN_BYTE 8 + + #include <stdio.h> |