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:
@@ -9,6 +9,7 @@
|
|||||||
|
|
||||||
#include "PackageItem.h"
|
#include "PackageItem.h"
|
||||||
|
|
||||||
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include <Alert.h>
|
#include <Alert.h>
|
||||||
@@ -43,8 +44,6 @@ enum {
|
|||||||
P_ATTRIBUTE
|
P_ATTRIBUTE
|
||||||
};
|
};
|
||||||
|
|
||||||
extern const char **environ;
|
|
||||||
|
|
||||||
|
|
||||||
status_t
|
status_t
|
||||||
inflate_data(uint8 *in, uint32 inSize, uint8 *out, uint32 outSize)
|
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_in = dup(0);
|
||||||
int old_out = dup(1);
|
int old_out = dup(1);
|
||||||
int old_err = dup(2);
|
int old_err = dup(2);
|
||||||
|
|
||||||
int filedes[2];
|
int filedes[2];
|
||||||
|
|
||||||
/* Create new pipe FDs as stdin, stdout, stderr */
|
/* Create new pipe FDs as stdin, stdout, stderr */
|
||||||
@@ -763,7 +762,7 @@ PackageScript::_RunScript(const char* workingDirectory, const BString& script)
|
|||||||
argv[2] = NULL;
|
argv[2] = NULL;
|
||||||
|
|
||||||
// "load" command.
|
// "load" command.
|
||||||
fThreadId = load_image(2, argv, environ);
|
fThreadId = load_image(2, argv, (const char**)environ);
|
||||||
|
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < 2; i++)
|
for (i = 0; i < 2; i++)
|
||||||
|
|||||||
Reference in New Issue
Block a user