--- /dev/null
+on uclibc secure_getenv is not available
+therefore default to using getenv instead
+
+Singed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Upstream-Status: Pending
+Index: git/src/shared/missing.h
+===================================================================
+--- git.orig/src/shared/missing.h 2012-09-22 18:46:44.141282145 -0700
++++ git/src/shared/missing.h 2012-09-22 18:48:44.081276570 -0700
+@@ -233,6 +233,8 @@
+ #ifndef HAVE_SECURE_GETENV
+ # ifdef HAVE___SECURE_GETENV
+ # define secure_getenv __secure_getenv
++# elif defined __UCLIBC__
++# define secure_getenv getenv
+ # else
+ # error neither secure_getenv nor __secure_getenv are available
+ # endif
---- systemd-pam-185/src/nspawn/nspawn.c.orig 2012-06-21 05:31:24.000000000 -0400
-+++ systemd-pam-185/src/nspawn/nspawn.c 2012-06-21 05:29:50.000000000 -0400
-@@ -61,6 +61,8 @@
- #include "path-util.h"
- #include "loopback-setup.h"
+Index: git/src/nspawn/nspawn.c
+===================================================================
+--- git.orig/src/nspawn/nspawn.c 2012-09-22 17:57:05.000000000 -0700
++++ git/src/nspawn/nspawn.c 2012-09-22 18:01:41.541405768 -0700
+@@ -63,6 +63,8 @@
+ LINK_GUEST
+ } LinkJournal;
+#include "config.h"
+
static char *arg_directory = NULL;
static char *arg_user = NULL;
static char **arg_controllers = NULL;
-@@ -1315,9 +1317,14 @@
-
- a[0] = (char*) "/sbin/init";
- execve(a[0], a, (char**) envp);
-- } else if (argc > optind)
-- execvpe(argv[optind], argv + optind, (char**) envp);
-- else {
-+ } else if (argc > optind) {
+@@ -1373,7 +1375,12 @@
+ a[0] = (char*) "/sbin/init";
+ execve(a[0], a, (char**) envp);
+ } else if (argc > optind)
+#ifdef HAVE_EXECVPE
-+ execvpe(argv[optind], argv + optind, (char**) envp);
+ execvpe(argv[optind], argv + optind, (char**) envp);
+#else
-+ environ = (char **)envp;
-+ execvp(argv[optind], argv + optind);
-+#endif /* HAVE_EXECVPE */
-+ } else {
- chdir(home ? home : "/root");
- execle("/bin/bash", "-bash", NULL, (char**) envp);
- }
++ environ = (char **)envp;
++ execvp(argv[optind], argv + optind);
++#endif /* HAVE_EXECVPE */
+ else {
+ chdir(home ? home : "/root");
+ execle("/bin/bash", "-bash", NULL, (char**) envp);
Index: git/Makefile.am
===================================================================
---- git.orig/Makefile.am 2012-07-22 16:20:38.424405916 -0700
-+++ git/Makefile.am 2012-07-22 16:23:21.232406621 -0700
-@@ -61,23 +61,23 @@
+--- git.orig/Makefile.am 2012-09-22 11:07:58.811981199 -0700
++++ git/Makefile.am 2012-09-22 11:09:11.267983956 -0700
+@@ -64,25 +64,25 @@
# Our own, non-special dirs
pkgsysconfdir=$(sysconfdir)/systemd
-userunitdir=$(prefix)/lib/systemd/user
+-userpresetdir=$(prefix)/lib/systemd/user-preset
-tmpfilesdir=$(prefix)/lib/tmpfiles.d
-sysctldir=$(prefix)/lib/sysctl.d
-usergeneratordir=$(prefix)/lib/systemd/user-generators
+userunitdir=$(prefix)/$(rootlibdir)/systemd/user
++userpresetdir=$(prefix)/$(rootlibdir)/systemd/user-preset
+tmpfilesdir=$(prefix)/$(rootlibdir)/tmpfiles.d
+sysctldir=$(prefix)/$(rootlibdir)/sysctl.d
+usergeneratordir=$(prefix)/$(rootlibdir)/systemd/user-generators
systemshutdowndir=$(rootlibexecdir)/system-shutdown
systemsleepdir=$(rootlibexecdir)/system-sleep
-systemunitdir=$(rootprefix)/lib/systemd/system
+-systempresetdir=$(rootprefix)/lib/systemd/system-preset
-udevlibexecdir=$(rootprefix)/lib/udev
+systemunitdir=$(rootprefix)/$(rootlibdir)/systemd/system
++systempresetdir=$(rootprefix)/$(rootlibdir)/systemd/system-preset
+udevlibexecdir=$(rootprefix)/$(rootlibdir)/udev
udevhomedir = $(udevlibexecdir)
udevrulesdir = $(udevlibexecdir)/rules.d
-rootlibexecdir=$(rootprefix)/lib/systemd
+rootlibexecdir=$(rootprefix)/$(rootlibdir)/systemd
- CLEANFILES =
+ CLEANFILES = $(BUILT_SOURCES)
EXTRA_DIST =
-@@ -126,7 +126,7 @@
+@@ -132,7 +132,7 @@
-DSYSTEMD_STDIO_BRIDGE_BINARY_PATH=\"$(bindir)/systemd-stdio-bridge\" \
-DROOTPREFIX=\"$(rootprefix)\" \
-DRUNTIME_DIR=\"/run\" \
-DSYSTEMD_CRYPTSETUP_PATH=\"$(rootlibexecdir)/systemd-cryptsetup\" \
-DSYSTEM_GENERATOR_PATH=\"$(systemgeneratordir)\" \
-DUSER_GENERATOR_PATH=\"$(usergeneratordir)\" \
-@@ -2535,7 +2535,7 @@
+@@ -2692,7 +2692,7 @@
binfmt-install-data-hook:
$(MKDIR_P) -m 0755 \
$(DESTDIR)$(sysconfdir)/binfmt.d \
$(DESTDIR)$(systemunitdir)/sysinit.target.wants
( cd $(DESTDIR)$(systemunitdir)/sysinit.target.wants && \
-@@ -3165,7 +3165,7 @@
+@@ -3107,7 +3107,7 @@
+
+ timedated-install-data-hook:
+ $(MKDIR_P) -m 0755 \
+- $(DESTDIR)$(prefix)/lib/systemd/ntp-units.d \
++ $(DESTDIR)$(prefix)/$(rootlibdir)/systemd/ntp-units.d \
+ $(DESTDIR)$(sysconfdir)/systemd/ntp-units.d
+ ( cd $(DESTDIR)$(systemunitdir) && \
+ rm -f dbus-org.freedesktop.timedate1.service && \
+@@ -3337,7 +3337,7 @@
logind-install-data-hook:
$(MKDIR_P) -m 0755 \
$(DESTDIR)$(systemunitdir)/multi-user.target.wants \
( cd $(DESTDIR)$(systemunitdir) && \
rm -f dbus-org.freedesktop.login1.service && \
$(LN_S) systemd-logind.service dbus-org.freedesktop.login1.service)
-@@ -3284,7 +3284,7 @@
+@@ -3494,7 +3494,7 @@
-e 's,@PACKAGE_VERSION\@,$(PACKAGE_VERSION),g' \
-e 's,@PACKAGE_NAME\@,$(PACKAGE_NAME),g' \
-e 's,@PACKAGE_URL\@,$(PACKAGE_URL),g' \
-e 's,@prefix\@,$(prefix),g' \
-e 's,@exec_prefix\@,$(exec_prefix),g' \
-e 's,@libdir\@,$(libdir),g' \
-@@ -3407,9 +3407,9 @@
+@@ -3619,9 +3619,9 @@
$(MKDIR_P) -m 0755 \
$(DESTDIR)$(tmpfilesdir) \
$(DESTDIR)$(sysconfdir)/tmpfiles.d \