summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2015-11-21 19:15:26 +0100
committerBent Bisballe Nyeng <deva@aasimon.org>2015-11-21 19:15:26 +0100
commita0a6ded818ff345fa5e6f251e83cb52f6e4ada2e (patch)
tree05bed16c247053828e0a001f6705ffe999cf1b4c /src
parentbabc6a3e556012de1b7c34296d25cfeba79de260 (diff)
Add missing include. Don't use strdup before string assignment...
Diffstat (limited to 'src')
-rw-r--r--src/configfile.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/configfile.cc b/src/configfile.cc
index 6b0d14f..8447d9a 100644
--- a/src/configfile.cc
+++ b/src/configfile.cc
@@ -30,6 +30,7 @@
#include <errno.h>
#include <string.h>
#include <stdlib.h>
+#include <unistd.h>
#include <sys/stat.h>
#include <sys/types.h>
@@ -65,7 +66,7 @@ static std::string configPath()
configpath = szPath;
}
#else
- std::string configpath = strdup(getenv("HOME"));
+ std::string configpath = getenv("HOME");
#endif
configpath += SEP;
configpath += CONFIGDIRNAME;