commit:     909489d4317eb4d1dddc1da95d08f365e39dc7b7
Author:     Matija Skala <mskala <AT> gmx <DOT> com>
AuthorDate: Mon Sep 16 20:51:59 2019 +0000
Commit:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Sat Sep 21 20:21:22 2019 +0000
URL:        https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=909489d4

fix compile on hurd

Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>

 q.c         | 4 ++--
 qmanifest.c | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/q.c b/q.c
index 3dd49f7..c03fd66 100644
--- a/q.c
+++ b/q.c
@@ -15,7 +15,7 @@
 #include <sys/stat.h>
 #include <fcntl.h>
 
-#if defined(__MACH__)
+#if defined(__MACH__) && defined(__APPLE__)
 #include <libproc.h>
 #endif
 
@@ -113,7 +113,7 @@ int q_main(int argc, char **argv)
                if (!quiet)
                        printf("Installing symlinks:\n");
 
-#if defined(__MACH__)
+#if defined(__MACH__) && defined(__APPLE__)
                rret = proc_pidpath(getpid(), buf, sizeof(buf));
                if (rret != -1)
                        rret = strlen(buf);

diff --git a/qmanifest.c b/qmanifest.c
index 41faa4c..10cd39c 100644
--- a/qmanifest.c
+++ b/qmanifest.c
@@ -91,7 +91,7 @@ char verify_manifest(const char *dir, const char *manifest, 
verify_msg **msgs);
 static inline void
 update_times(struct timeval *tv, struct stat *s)
 {
-#ifdef __MACH__
+#ifdef __MACH__ && defined __APPLE__
 # define st_mtim st_mtimespec
 # define st_atim st_atimespec
 #endif

Reply via email to