diff options
author | Britney Fransen <brfransen@gmail.com> | 2015-02-19 18:16:16 (GMT) |
---|---|---|
committer | Britney Fransen <brfransen@gmail.com> | 2015-02-19 18:16:16 (GMT) |
commit | 8de064f6e96f960cdbfe6868d9957a4613f704df (patch) | |
tree | 4e73a420991733450d013529c0fee60e0365297a /abs/extra/libbsd/spt.patch | |
parent | 0374b16f1e15ba1819b62bd5a6e0076ac7b243d0 (diff) | |
parent | 6fde8cd5e74f0840e01988e743464fe91c0a28f8 (diff) | |
download | linhes_pkgbuild-8de064f6e96f960cdbfe6868d9957a4613f704df.zip linhes_pkgbuild-8de064f6e96f960cdbfe6868d9957a4613f704df.tar.gz linhes_pkgbuild-8de064f6e96f960cdbfe6868d9957a4613f704df.tar.bz2 |
Merge branch 'testing'
Diffstat (limited to 'abs/extra/libbsd/spt.patch')
-rw-r--r-- | abs/extra/libbsd/spt.patch | 50 |
1 files changed, 0 insertions, 50 deletions
diff --git a/abs/extra/libbsd/spt.patch b/abs/extra/libbsd/spt.patch deleted file mode 100644 index b19dc9b..0000000 --- a/abs/extra/libbsd/spt.patch +++ /dev/null @@ -1,50 +0,0 @@ -diff -u -r libbsd-0.5.2-orig/src/setproctitle.c libbsd-0.5.2/src/setproctitle.c ---- libbsd-0.5.2-orig/src/setproctitle.c 2013-06-08 18:26:04.000000000 +0200 -+++ libbsd-0.5.2/src/setproctitle.c 2013-06-18 02:35:59.441393418 +0200 -@@ -86,7 +86,7 @@ - if (environ != envp) - return 0; - -- /* Make a copy of the old environ array of pointers, in case -+ /* Make a deep copy of the old environ array of pointers, in case - * clearenv() or setenv() is implemented to free the internal - * environ array, because we will need to access the old environ - * contents to make the new copy. */ -@@ -94,11 +94,13 @@ - envcopy = malloc(envsize); - if (envcopy == NULL) - return errno; -- memcpy(envcopy, envp, envsize); -+ for (i = 0; envp[i]; i++) envcopy[i] = strdup(envp[i]); -+ envcopy[i] = NULL; - - error = spt_clearenv(); - if (error) { - environ = envp; -+ for(i = 0; envcopy[i]; i++) free(envcopy[i]); - free(envcopy); - return error; - } -@@ -116,18 +118,20 @@ - if (error) { - #ifdef HAVE_CLEARENV - /* Because the old environ might not be available -- * anymore we will make do with the shallow copy. */ -+ * anymore we will make do with the deep copy. */ - environ = envcopy; - #else - environ = envp; -+ for(i = 0; envcopy[i]; i++) free(envcopy[i]); - free(envcopy); - #endif - return error; - } - } - -- /* Dispose of the shallow copy, now that we've finished transfering -+ /* Dispose of the deep copy, now that we've finished transfering - * the old environment. */ -+ for(i = 0; envcopy[i]; i++) free(envcopy[i]); - free(envcopy); - - return 0; |