cronie/debian/patches/Extend-support-for-kFreeBSD-and-GNU-HURD.patch
2021-08-09 15:08:55 +02:00

41 lines
1.3 KiB
Diff

From: Christian Kastner <ckk@kvr.at>
Date: Sun, 7 Aug 2011 19:48:09 +0200
Subject: Extend support for kFreeBSD and GNU HURD
Extend some of the #ifdefs to include kFreeBSD and HURD where it's obviously OK
to do so
Forwarded: no
Last-Update: 2011-08-07
---
src/entry.c | 2 +-
src/pathnames.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/entry.c b/src/entry.c
index e3a3b1d..1de1bd0 100644
--- a/src/entry.c
+++ b/src/entry.c
@@ -379,7 +379,7 @@ entry *load_entry(FILE * file, void (*error_func) (), struct passwd *pw,
}
else
log_it("CRON", getpid(), "ERROR", "can't set LOGNAME", 0);
-#if defined(BSD) || defined(__linux)
+#if defined(BSD) || defined(__linux) || defined(__GLIBC__) || defined(__gnu_hurd__)
if (glue_strings(envstr, sizeof envstr, "USER", pw->pw_name, '=')) {
if ((tenvp = env_set(e->envp, envstr)) == NULL) {
ecode = e_memory;
diff --git a/src/pathnames.h b/src/pathnames.h
index 1d716be..f8c53fe 100644
--- a/src/pathnames.h
+++ b/src/pathnames.h
@@ -26,7 +26,7 @@
#ifndef _PATHNAMES_H_
#define _PATHNAMES_H_
-#if (defined(BSD)) && (BSD >= 199103) || defined(__linux) || defined(AIX)
+#if (defined(BSD)) && (BSD >= 199103) || defined(__linux) || defined(AIX) || defined(__GLIBC__) || defined(__gnu_hurd__)
# include <paths.h>
#endif /*BSD*/