freebsd-ports/devel/titano/files/patch-src_prefs.cc
Alexey Dokuchaev bad8d0a212 - Update to 0.0.7 and unbreak
- Fix dependencies
- Respect C{C,XX} and C[XX]FLAGS
- Fix spelling typo in pkg-descr, kill dots/space at EOLs
- Utilize DATADIR in pkg-plist
- Take maintainership
2005-04-13 11:47:35 +00:00

25 lines
494 B
C++

--- 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;
};