mirror of
https://git.freebsd.org/ports.git
synced 2025-07-18 09:49:18 -04:00
misc/librepo: Fix SEGV by patching sources to make 2 functions be properly declared and called.
This commit is contained in:
parent
f0223d1315
commit
ad505c9d58
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=550261
3 changed files with 24 additions and 4 deletions
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
PORTNAME= librepo
|
PORTNAME= librepo
|
||||||
DISTVERSION= 1.12.1
|
DISTVERSION= 1.12.1
|
||||||
PORTREVISION= 1
|
PORTREVISION= 2
|
||||||
CATEGORIES= misc
|
CATEGORIES= misc
|
||||||
|
|
||||||
MAINTAINER= yuri@FreeBSD.org
|
MAINTAINER= yuri@FreeBSD.org
|
||||||
|
|
|
@ -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.orig 2020-08-22 20:15:59 UTC
|
||||||
+++ librepo/downloader.c
|
+++ librepo/downloader.c
|
||||||
@@ -18,9 +18,11 @@
|
@@ -18,9 +18,11 @@
|
||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
* 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__
|
+#if __FreeBSD__
|
||||||
#define _XOPEN_SOURCE 500 // Because of fdopen() and ftruncate()
|
+//#define _XOPEN_SOURCE 500 // Because of fdopen() and ftruncate()
|
||||||
#define _DEFAULT_SOURCE // Because of futimes()
|
+//#define _DEFAULT_SOURCE // Because of futimes()
|
||||||
#define _BSD_SOURCE // Because of futimes()
|
+//#define _BSD_SOURCE // Because of futimes()
|
||||||
+#endif
|
+#endif
|
||||||
|
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
|
|
15
misc/librepo/files/patch-librepo_yum.c
Normal file
15
misc/librepo/files/patch-librepo_yum.c
Normal file
|
@ -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>
|
Loading…
Add table
Reference in a new issue