summaryrefslogtreecommitdiff
path: root/devel/titano/files/patch-src_prefs.cc
diff options
context:
space:
mode:
Diffstat (limited to 'devel/titano/files/patch-src_prefs.cc')
-rw-r--r--devel/titano/files/patch-src_prefs.cc25
1 files changed, 25 insertions, 0 deletions
diff --git a/devel/titano/files/patch-src_prefs.cc b/devel/titano/files/patch-src_prefs.cc
new file mode 100644
index 000000000000..48b1f21ab9bb
--- /dev/null
+++ b/devel/titano/files/patch-src_prefs.cc
@@ -0,0 +1,25 @@
+--- src/prefs.cc.orig Sat Dec 9 16:07:38 2000
++++ src/prefs.cc Thu Apr 7 20:48:59 2005
+@@ -18,6 +18,7 @@
+ */
+
+ #include <stdlib.h>
++#include <unistd.h>
+
+ #include "util.h"
+ #include "conffile.h"
+@@ -33,9 +34,13 @@
+ {
+ if(name.empty())
+ name = getenv("USER");
++ if (name.empty())
++ name = "nobody";
+
+ if(mail.empty()){
+- char *host = getenv("HOSTNAME");
++ char host[256];
++ if (gethostname(host, 256))
++ strncpy(host, "dev.null.org", 255);
+ mail = name + "@" + host;
+ };
+