Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Fix aur/librepo 1.8.1 compilation issues
--- ./cmake/Modules/FindXattr.cmake.orig 2018-08-07 12:38:05.869001803 -0400
+++ ./cmake/Modules/FindXattr.cmake 2018-08-07 12:38:10.632150434 -0400
@@ -2,7 +2,7 @@
# XATTR_INCLUDE_DIRS include directories
# XATTR_LIBRARIES libattr library
-FIND_PATH(XATTR_INCLUDE attr/xattr.h
+FIND_PATH(XATTR_INCLUDE sys/xattr.h
/usr/include
/usr/local/include
${CMAKE_INCLUDE_PATH}
--- ./librepo/downloader.c.orig 2018-08-07 12:38:29.548104583 -0400
+++ ./librepo/downloader.c 2018-08-07 12:38:33.717951948 -0400
@@ -30,7 +30,7 @@
#include <sys/stat.h>
#include <fcntl.h>
#include <curl/curl.h>
-#include <attr/xattr.h>
+#include <sys/xattr.h>
#include "downloader.h"
#include "downloader_internal.h"
@@ -1161,7 +1161,7 @@
const guint num_running_downloads_from_repo = GPOINTER_TO_UINT(value);
// Calculate a max speed (rounded up) per target (for repo)
- const gint64 single_target_speed =
+ const gint64 single_target_speed =
(repo->maxspeed + (num_running_downloads_from_repo - 1)) / num_running_downloads_from_repo;
for (GSList *elem = dd->running_transfers; elem; elem = g_slist_next(elem)) {
@@ -1739,8 +1739,8 @@
if (!fatal_error &&
!complete_url_in_path &&
!target->target->baseurl)
- {
-
+ {
+
// Temporary error (serious_error) during download occured and
// another transfers are running or there are successful transfers
// and fewer failed transfers than tried parallel connections. It may be mirror is OK
@@ -1774,7 +1774,7 @@
return FALSE;
}
}
-
+
if (!retry) {
// No more mirrors to try or baseurl used or fatal error
g_debug("%s: No more retries (tried: %d)",
--- ./librepo/checksum.c.orig 2018-08-07 12:38:17.485221782 -0400
+++ ./librepo/checksum.c 2018-08-07 12:38:22.818354268 -0400
@@ -26,7 +26,7 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
-#include <attr/xattr.h>
+#include <sys/xattr.h>
#include <openssl/evp.h>
#include "cleanup.h"
--- ./tests/test_checksum.c.orig 2018-08-07 12:38:39.684402954 -0400
+++ ./tests/test_checksum.c 2018-08-07 12:38:46.190838070 -0400
@@ -6,7 +6,7 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
-#include <attr/xattr.h>
+#include <sys/xattr.h>
#include "librepo/util.h"
#include "librepo/checksum.h"
--- ./librepo/checksum.c.orig 2018-08-07 12:41:13.869835360 -0400
+++ ./librepo/checksum.c 2018-08-07 12:41:28.412827064 -0400
@@ -18,6 +18,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include <errno.h>
#include <glib.h>
#include <glib/gprintf.h>
#include <assert.h>
--- ./tests/test_checksum.c.orig 2018-08-07 12:42:45.607899179 -0400
+++ ./tests/test_checksum.c 2018-08-07 12:42:57.967675828 -0400
@@ -1,4 +1,5 @@
#define _GNU_SOURCE
+#include <errno.h>
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.