fix build error on OSX

- fix typo in embedded_data.cpp
Esse commit está contido em:
Daniel Sloof
2013-07-22 19:09:55 -07:00
commit de Sara Golemon
commit 77fb706e57
2 arquivos alterados com 6 adições e 3 exclusões
+5 -1
Ver Arquivo
@@ -18,6 +18,10 @@
#include <unistd.h>
#include <limits.h>
#ifdef __APPLE__
#include <mach-o/dyld.h>
#endif
namespace HPHP {
std::string current_executable_path() {
@@ -29,7 +33,7 @@ std::string current_executable_path() {
char result[PATH_MAX];
uint32_t size = sizeof(result);
uint32_t success = _NSGetExecutablePath(result, &size);
return std:string(result, (success == 0) ? size : 0);
return std::string(result, (success == 0) ? size : 0);
#else
// Return empty string for all other platforms for now (e.g. FreeBSD)
return std::string();
+1 -2
Ver Arquivo
@@ -29,7 +29,6 @@
#include <unistd.h>
#ifdef __APPLE__
#include <mach-o/dyld.h>
#include <mach-o/getsect.h>
#endif
@@ -78,7 +77,7 @@ bool get_embedded_data(const char *section, embedded_data* desc) {
#else // __APPLE__
const struct section_64 *sect = getsectbyname("__text", section);
if (sect) {
string path = current_executable();
std::string path = current_executable_path();
if (!path.empty()) {
desc->m_filename = path;
} else {