forked from mirrors/nixpkgs
58 lines
1.2 KiB
Diff
58 lines
1.2 KiB
Diff
diff --git src/libdnf/config.h src/libdnf/config.h
|
|
index 16121f6f..737d0bc4 100644
|
|
--- src/libdnf/config.h
|
|
+++ src/libdnf/config.h
|
|
@@ -18,7 +18,12 @@
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
*/
|
|
|
|
+
|
|
+#ifdef __APPLE__
|
|
+#include <stdint.h>
|
|
+#else
|
|
#include <bits/wordsize.h>
|
|
+#endif
|
|
|
|
|
|
#if __WORDSIZE == 32
|
|
#include "config-32.h"
|
|
diff --git src/libdnf/hy-iutil.cpp src/libdnf/hy-iutil.cpp
|
|
index 497c560d..5de077fa 100644
|
|
--- src/libdnf/hy-iutil.cpp
|
|
+++ src/libdnf/hy-iutil.cpp
|
|
@@ -22,7 +22,7 @@
|
|
#include <errno.h>
|
|
#include <dirent.h>
|
|
#include <fcntl.h>
|
|
-#include <linux/limits.h>
|
|
+#include <limits.h>
|
|
#include <pwd.h>
|
|
#include <unistd.h>
|
|
#include <stdio.h>
|
|
diff --git src/libdnf/hy-util.cpp src/libdnf/hy-util.cpp
|
|
index 295fdc1b..9d584b8a 100644
|
|
--- src/libdnf/hy-util.cpp
|
|
+++ src/libdnf/hy-util.cpp
|
|
@@ -24,7 +24,20 @@
|
|
#include <ctype.h>
|
|
#include <sys/utsname.h>
|
|
#include <sys/stat.h>
|
|
-#include <sys/auxv.h>
|
|
+
|
|
+// Darwin compatibility hacks
|
|
+typedef int auxv_t;
|
|
+#ifndef AT_HWCAP2
|
|
+#define AT_HWCAP2 26
|
|
+#endif
|
|
+#ifndef AT_HWCAP
|
|
+#define AT_HWCAP 16
|
|
+#endif
|
|
+static unsigned long getauxval(unsigned long type)
|
|
+{
|
|
+ unsigned long ret = 0;
|
|
+ return ret;
|
|
+}
|
|
|
|
// hawkey
|
|
#include "dnf-types.h"
|