PackageInstaller: Fix the build.

Previously, <stdlib.h> wasn't included (which is where environ is),
but Axel changed some Be API headers and now it is indirectly included,
which broke the build.

Fixes #12263.
This commit is contained in:
Augustin Cavalier
2015-07-31 11:02:33 -04:00
parent 3333f96888
commit 9bec480a7d
+3 -4
View File
@@ -9,6 +9,7 @@
#include "PackageItem.h"
#include <stdlib.h>
#include <string.h>
#include <Alert.h>
@@ -43,8 +44,6 @@ enum {
P_ATTRIBUTE
};
extern const char **environ;
status_t
inflate_data(uint8 *in, uint32 inSize, uint8 *out, uint32 outSize)
@@ -748,7 +747,7 @@ PackageScript::_RunScript(const char* workingDirectory, const BString& script)
int old_in = dup(0);
int old_out = dup(1);
int old_err = dup(2);
int filedes[2];
/* Create new pipe FDs as stdin, stdout, stderr */
@@ -763,7 +762,7 @@ PackageScript::_RunScript(const char* workingDirectory, const BString& script)
argv[2] = NULL;
// "load" command.
fThreadId = load_image(2, argv, environ);
fThreadId = load_image(2, argv, (const char**)environ);
int i;
for (i = 0; i < 2; i++)