Buildfix
This commit is contained in:
parent
dccb7bafdd
commit
bc3f6ee57a
2 changed files with 5 additions and 2 deletions
|
@ -1,7 +1,8 @@
|
||||||
set(SRCS
|
set(SRCS
|
||||||
LAMEString.cpp
|
LAMEString.cpp
|
||||||
colorutil.cpp
|
colorutil.cpp
|
||||||
error_context.cpp)
|
error_context.cpp
|
||||||
|
display.cpp)
|
||||||
|
|
||||||
set(SRCS ${SRCS})
|
set(SRCS ${SRCS})
|
||||||
|
|
||||||
|
|
|
@ -6,6 +6,8 @@
|
||||||
#include <shlobj.h>
|
#include <shlobj.h>
|
||||||
#include <shlwapi.h>
|
#include <shlwapi.h>
|
||||||
#include <ShellAPI.h>
|
#include <ShellAPI.h>
|
||||||
|
#else
|
||||||
|
#include <pwd.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
@ -169,7 +171,7 @@ int main(int argc, char *argv[]) {
|
||||||
#else
|
#else
|
||||||
// Mac - what about linux? Also, ugly hardcoding.
|
// Mac - what about linux? Also, ugly hardcoding.
|
||||||
const char *path = getenv("HOME");
|
const char *path = getenv("HOME");
|
||||||
if (!homeDir) {
|
if (!path) {
|
||||||
struct passwd* pwd = getpwuid(getuid());
|
struct passwd* pwd = getpwuid(getuid());
|
||||||
if (pwd)
|
if (pwd)
|
||||||
path = pwd->pw_dir;
|
path = pwd->pw_dir;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue