From 575d4712e1c4305acdba74e1af9277114ce99883 Mon Sep 17 00:00:00 2001 From: Peter Korsgaard Date: Sat, 31 Mar 2012 23:57:35 +0200 Subject: systemd: fix build on uClibc Patch based on similar patch in openembedded. Signed-off-by: Peter Korsgaard --- package/systemd/systemd-uclibc-fix.patch | 40 ++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 package/systemd/systemd-uclibc-fix.patch (limited to 'package/systemd/systemd-uclibc-fix.patch') diff --git a/package/systemd/systemd-uclibc-fix.patch b/package/systemd/systemd-uclibc-fix.patch new file mode 100644 index 000000000..24c32ab94 --- /dev/null +++ b/package/systemd/systemd-uclibc-fix.patch @@ -0,0 +1,40 @@ +[PATCH] fix build with uClibc + +Based on OE patch from Khem Raj: + +http://cgit.openembedded.org/meta-openembedded/tree/meta-oe/recipes-core/systemd/systemd/paper-over-mkostemp.patch + +But extended to also cover execvpe (OE carries a patch adding execvpe +support to uClibc). + +Signed-off-by: Peter Korsgaard +--- + src/macro.h | 15 +++++++++++++++ + 1 file changed, 15 insertions(+) + +Index: systemd-37/src/macro.h +=================================================================== +--- systemd-37.orig/src/macro.h ++++ systemd-37/src/macro.h +@@ -27,6 +27,21 @@ + #include + #include + ++#ifdef __UCLIBC__ ++/* uclibc does not implement mkostemp GNU extension */ ++#define mkostemp(x,y) mkstemp(x) ++/* uclibc does not implement execvpe GNU extension */ ++#ifndef _GNU_SOURCE ++#define _GNU_SOURCE ++#endif ++#include ++static inline int execvpe(const char *file, char *const argv[], ++ char *const envp[]) ++{ ++ environ = (char **)envp; ++ return execvp(file, argv); ++} ++#endif + #define _printf_attr_(a,b) __attribute__ ((format (printf, a, b))) + #define _sentinel_ __attribute__ ((sentinel)) + #define _noreturn_ __attribute__((noreturn)) -- cgit v1.2.3